Together is the power

0

0 votes
Easy
Problem

Buddy believes that things which show togetherness or follow some pattern are always better. Due to this reason he has some kind of affintiy towards consecutive numbers. He has X amount of money and he wants to buy some chocolates whose cost should be consective integers and they should sum to X. For this he goes to a shop which has chocolates of all prices from 1 to X. Buddy wants to know how many ways are there for him to buy the chocolates.

Constraints:
1 ≤ X ≤ 1012

Input:
First and the only line of input contains the number X, amount of money Buddy has.

Output:

Output a single integer showing total number of ways.

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

For 15 sum possible ways to buy chocolates are

1 + 2 + 3 + 4 + 5

4 + 5 + 6

7 + 8

15

hence answer is 4

Editor Image

?