401818: GYM100534 A Abnormal Coins

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Abnormal Coinstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

If you have participated or solved any of the four previous AUT local contests, you may have noticed that first problem of each contest were all about abnormal new students of Amirkabir UT. This time we want to talk about coins in our problem-set but to respect traditions, let's start with abnormal type of coins. Everybody knows what coins are, "A flat, typically round piece of metal with an official stamp, used as money.". But as wikipedia "Not all coins are round. The Australian 50 cent coin, for example, has twelve flat sides. Some coins have wavy edges, e.g. the $2 and 20-cent coins of Hong Kong and the 10 cent coins of Bahamas. Some are square-shaped, such as the 15 cent coin of the Bahamas. During the 1970s, Swazi coins were minted in several shapes, including squares, polygons, and wavy edged circles with 8 and 12 waves." Steve is a great coin collector but he has no polygon shaped coin in his collection. Recently he found another coin lover, Johnny, Who has a collection of polygon coins and fortunately agreed to deal with Steve. The deal is simple, e coins for each poly-coin with e edges. Steve can offer n coin(s) and wants to earn as many poly-coin types as possible to extend his collection. Two poly-coins are different if they differ in number of edges.

Input

Input contains a single integer n. (1 ≤ n ≤ 108)

Output

Output a single integer indicating the maximum number of distinct poly-coins Steve can earn.

ExamplesInput
2
Output
0
Input
3
Output
1
Input
100000000
Output
14139

加入题单

上一题 下一题 算法标签: