Subtrees

Time Limit: 1000ms
Memory Limit: 131072KB
This problem will be judged on HDU. Original ID: 5524
64-bit integer IO format: %I64d      Java class name: Main

Description

There is a complete binary tree with N nodes.The subtree of the node i has Ai nodes.How many distinct numbers are there of Ai?

Input

There are multiple test cases, no more than 1000 cases.
For each case contains a single integer N on a line.$(1\leq N\leq {10}^{18})$

Output

The output of each case will be a single integer on a line:the number of subtrees that contain different nodes.

Sample Input

5
6
7
8

Sample Output

3
4
3
5

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .