Yo`nalishlar
Hozirda online

Statistika

Masalalar soni: 909

Foydalanuvchilar soni: 8819

Jo'natishlar soni: 714352

Muhokama yozuvlari: 4541

Yangiliklar soni: 97

Yangiliklar izohlari: 1174


So'ngi izohlar

743. Scientific Problem
Vaqt limiti: 1 sekund
Xotira limiti: 64 MB

Once upon a time Professor Idioticideasinventor was travelling by train. Watching cheerless landscape outside the window, he decided to invent the theme of his new scientific work. All of a sudden a brilliant idea struck him: to develop an effective algorithm finding an integer number, which is x times less than the sum of all its integer positive predecessors, where number x is given. As far as he has no computer in the train, you have to solve this difficult problem.

Input

  The first line of the input file contains an integer number x (1 ≤ x ≤ 109).

Output

 Output an integer number — the answer to the problem.

Input

Output

1

1

3

2

2

5

 

Tayyorladi: Azat Yusupov
Text from: acm.sgu.ru
Mening urinishlarim(0) Muhokama (0) Jo'natish Eng yaxshi yechimlar Barcha muvaffaqiyatli urinishlar(50) Barcha urinishlar(56)