﻿ Fuzhou University OnlineJudge ﻿
Problem 2061 Suneast & Daxia

## Problem Description

Daxia is so cute that people loves it so much.

Everyone wants to buy Daxia from Suneast (a business man who sells Daxia).

Suneast is a strange business man. He sells Daxia in a random price from 1, 2, 3, 4, 5…, n.

We now consider the price of Daxia is N \$. If a custom has M \$(M>=N) in hand and buy Daxia using Q \$(N<=Q<=M), Suneast needs to return R=(Q-N) \$ to the custom. Suneast is so a strange business man that he take the Q \$, and he refuses to look for a change if the custom can’t show him R\$ in his hand.

Now, we want to know how many pieces of money people should bring with to buy a Daxia with the exactly price. (The value of money can be any positive integers.)

## Input

There are multiple test cases. Each test case has an integer n (1<=n<=254664467) in a single line.

## Output

For each case, output a single integer in a line indicates the number of pieces of money people should bring with to buy a Daxia whose price is random from 1 to n.

1 2 5

1 2 3

## Hint

In test case 1: people can bring 1 piece of money: 1\$

In test case 2: people can bring 2 pieces of money:

In test case 3: people can bring 3 pieces of money:

## Source

FOJ有奖月赛-2011年11月

Submit  Back  Status  Discuss
﻿