## Baby Oreo

View as PDF

Points: 5
Time limit: 1.5s
Memory limit: 64M

Author:
Problem type

Sharmin likes Oreos. In fact, he likes them so much that he currently has of them at his home.

Sharmin wants to maximize the number of days he can eat his Oreos for, but also wants to eat a different amount of Oreos each day. If he still has Oreos, but he already ate that amount on a previous day, he will give the remaining Oreos to his friend.

Given the constraints, Sharmin wants to know the maximum number of days he can eat Oreos for. Can you help him?

Note that Sharmin must eat a nonzero amount of Oreos each day.

#### Input Specification

The first and only line will contain one integer .

#### Output Specification

Output one integer, the maximum number of days Sharmin can eat Oreos for given the constraints.

#### Sample Input 1

53

#### Sample Output 1

9

#### Sample Explanation 1

Sharmin can eat the Oreos as follows: .

#### Sample Input 2

123971239871

#### Sample Output 2

497937