Problem:
Score : 200 points

Problem Statement

Takahashi has a deposit of 100 yen (the currency of Japan) in AtCoder Bank.

The bank pays an annual interest rate of 1 % compounded annually. (A fraction of less than one yen is discarded.)

Assuming that nothing other than the interest affects Takahashi's balance, in how many years does the balance reach X yen or above for the first time?

Constraints

101 \le X \le 10^{18}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X

Output

Print the number of years it takes for Takahashi's balance to reach X yen or above for the first time.

Sample Input 1

103

Sample Output 1

3

The balance after one year is 101 yen.

The balance after two years is 102 yen.

The balance after three years is 103 yen.

Thus, it takes three years for the balance to reach 103 yen or above.

Sample Input 2

1000000000000000000

Sample Output 2

3760

Sample Input 3

1333333333

Sample Output 3

1706

Solution in C (GCC 9.2.1) (judge verdict: Wrong Answer)

#include <stdio.h>
int main() {//二分検索練習
	long long x, y[3761] = { 100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,303,306,309,312,315,318,321,324,327,330,333,336,339,342,345,348,351,354,357,360,363,366,369,372,375,378,381,384,387,390,393,396,399,402,406,410,414,418,422,426,430,434,438,442,446,450,454,458,462,466,470,474,478,482,486,490,494,498,502,507,512,517,522,527,532,537,542,547,552,557,562,567,572,577,582,587,592,597,602,608,614,620,626,632,638,644,650,656,662,668,674,680,686,692,698,704,711,718,725,732,739,746,753,760,767,774,781,788,795,802,810,818,826,834,842,850,858,866,874,882,890,898,906,915,924,933,942,951,960,969,978,987,996,1005,1015,1025,1035,1045,1055,1065,1075,1085,1095,1105,1116,1127,1138,1149,1160,1171,1182,1193,1204,1216,1228,1240,1252,1264,1276,1288,1300,1313,1326,1339,1352,1365,1378,1391,1404,1418,1432,1446,1460,1474,1488,1502,1517,1532,1547,1562,1577,1592,1607,1623,1639,1655,1671,1687,1703,1720,1737,1754,1771,1788,1805,1823,1841,1859,1877,1895,1913,1932,1951,1970,1989,2008,2028,2048,2068,2088,2108,2129,2150,2171,2192,2213,2235,2257,2279,2301,2324,2347,2370,2393,2416,2440,2464,2488,2512,2537,2562,2587,2612,2638,2664,2690,2716,2743,2770,2797,2824,2852,2880,2908,2937,2966,2995,3024,3054,3084,3114,3145,3176,3207,3239,3271,3303,3336,3369,3402,3436,3470,3504,3539,3574,3609,3645,3681,3717,3754,3791,3828,3866,3904,3943,3982,4021,4061,4101,4142,4183,4224,4266,4308,4351,4394,4437,4481,4525,4570,4615,4661,4707,4754,4801,4849,4897,4945,4994,5043,5093,5143,5194,5245,5297,5349,5402,5456,5510,5565,5620,5676,5732,5789,5846,5904,5963,6022,6082,6142,6203,6265,6327,6390,6453,6517,6582,6647,6713,6780,6847,6915,6984,7053,7123,7194,7265,7337,7410,7484,7558,7633,7709,7786,7863,7941,8020,8100,8181,8262,8344,8427,8511,8596,8681,8767,8854,8942,9031,9121,9212,9304,9397,9490,9584,9679,9775,9872,9970,10069,10169,10270,10372,10475,10579,10684,10790,10897,11005,11115,11226,11338,11451,11565,11680,11796,11913,12032,12152,12273,12395,12518,12643,12769,12896,13024,13154,13285,13417,13551,13686,13822,13960,14099,14239,14381,14524,14669,14815,14963,15112,15263,15415,15569,15724,15881,16039,16199,16360,16523,16688,16854,17022,17192,17363,17536,17711,17888,18066,18246,18428,18612,18798,18985,19174,19365,19558,19753,19950,20149,20350,20553,20758,20965,21174,21385,21598,21813,22031,22251,22473,22697,22923,23152,23383,23616,23852,24090,24330,24573,24818,25066,25316,25569,25824,26082,26342,26605,26871,27139,27410,27684,27960,28239,28521,28806,29094,29384,29677,29973,30272,30574,30879,31187,31498,31812,32130,32451,32775,33102,33433,33767,34104,34445,34789,35136,35487,35841,36199,36560,36925,37294,37666,38042,38422,38806,39194,39585,39980,40379,40782,41189,41600,42016,42436,42860,43288,43720,44157,44598,45043,45493,45947,46406,46870,47338,47811,48289,48771,49258,49750,50247,50749,51256,51768,52285,52807,53335,53868,54406,54950,55499,56053,56613,57179,57750,58327,58910,59499,60093,60693,61299,61911,62530,63155,63786,64423,65067,65717,66374,67037,67707,68384,69067,69757,70454,71158,71869,72587,73312,74045,74785,75532,76287,77049,77819,78597,79382,80175,80976,81785,82602,83428,84262,85104,85955,86814,87682,88558,89443,90337,91240,92152,93073,94003,94943,95892,96850,97818,98796,99783,100780,101787,102804,103832,104870,105918,106977,108046,109126,110217,111319,112432,113556,114691,115837,116995,118164,119345,120538,121743,122960,124189,125430,126684,127950,129229,130521,131826,133144,134475,135819,137177,138548,139933,141332,142745,144172,145613,147069,148539,150024,151524,153039,154569,156114,157675,159251,160843,162451,164075,165715,167372,169045,170735,172442,174166,175907,177666,179442,181236,183048,184878,186726,188593,190478,192382,194305,196248,198210,200192,202193,204214,206256,208318,210401,212505,214630,216776,218943,221132,223343,225576,227831,230109,232410,234734,237081,239451,241845,244263,246705,249172,251663,254179,256720,259287,261879,264497,267141,269812,272510,275235,277987,280766,283573,286408,289272,292164,295085,298035,301015,304025,307065,310135,313236,316368,319531,322726,325953,329212,332504,335829,339187,342578,346003,349463,352957,356486,360050,363650,367286,370958,374667,378413,382197,386018,389878,393776,397713,401690,405706,409763,413860,417998,422177,426398,430661,434967,439316,443709,448146,452627,457153,461724,466341,471004,475714,480471,485275,490127,495028,499978,504977,510026,515126,520277,525479,530733,536040,541400,546814,552282,557804,563382,569015,574705,580452,586256,592118,598039,604019,610059,616159,622320,628543,634828,641176,647587,654062,660602,667208,673880,680618,687424,694298,701240,708252,715334,722487,729711,737008,744378,751821,759339,766932,774601,782347,790170,798071,806051,814111,822252,830474,838778,847165,855636,864192,872833,881561,890376,899279,908271,917353,926526,935791,945148,954599,964144,973785,983522,993357,1003290,1013322,1023455,1033689,1044025,1054465,1065009,1075659,1086415,1097279,1108251,1119333,1130526,1141831,1153249,1164781,1176428,1188192,1200073,1212073,1224193,1236434,1248798,1261285,1273897,1286635,1299501,1312496,1325620,1338876,1352264,1365786,1379443,1393237,1407169,1421240,1435452,1449806,1464304,1478947,1493736,1508673,1523759,1538996,1554385,1569928,1585627,1601483,1617497,1633671,1650007,1666507,1683172,1700003,1717003,1734173,1751514,1769029,1786719,1804586,1822631,1840857,1859265,1877857,1896635,1915601,1934757,1954104,1973645,1993381,2013314,2033447,2053781,2074318,2095061,2116011,2137171,2158542,2180127,2201928,2223947,2246186,2268647,2291333,2314246,2337388,2360761,2384368,2408211,2432293,2456615,2481181,2505992,2531051,2556361,2581924,2607743,2633820,2660158,2686759,2713626,2740762,2768169,2795850,2823808,2852046,2880566,2909371,2938464,2967848,2997526,3027501,3057776,3088353,3119236,3150428,3181932,3213751,3245888,3278346,3311129,3344240,3377682,3411458,3445572,3480027,3514827,3549975,3585474,3621328,3657541,3694116,3731057,3768367,3806050,3844110,3882551,3921376,3960589,4000194,4040195,4080596,4121401,4162615,4204241,4246283,4288745,4331632,4374948,4418697,4462883,4507511,4552586,4598111,4644092,4690532,4737437,4784811,4832659,4880985,4929794,4979091,5028881,5079169,5129960,5181259,5233071,5285401,5338255,5391637,5445553,5500008,5555008,5610558,5666663,5723329,5780562,5838367,5896750,5955717,6015274,6075426,6136180,6197541,6259516,6322111,6385332,6449185,6513676,6578812,6644600,6711046,6778156,6845937,6914396,6983539,7053374,7123907,7195146,7267097,7339767,7413164,7487295,7562167,7637788,7714165,7791306,7869219,7947911,8027390,8107663,8188739,8270626,8353332,8436865,8521233,8606445,8692509,8779434,8867228,8955900,9045459,9135913,9227272,9319544,9412739,9506866,9601934,9697953,9794932,9892881,9991809,10091727,10192644,10294570,10397515,10501490,10606504,10712569,10819694,10927890,11037168,11147539,11259014,11371604,11485320,11600173,11716174,11833335,11951668,12071184,12191895,12313813,12436951,12561320,12686933,12813802,12941940,13071359,13202072,13334092,13467432,13602106,13738127,13875508,14014263,14154405,14295949,14438908,14583297,14729129,14876420,15025184,15175435,15327189,15480460,15635264,15791616,15949532,16109027,16270117,16432818,16597146,16763117,16930748,17100055,17271055,17443765,17618202,17794384,17972327,18152050,18333570,18516905,18702074,18889094,19077984,19268763,19461450,19656064,19852624,20051150,20251661,20454177,20658718,20865305,21073958,21284697,21497543,21712518,21929643,22148939,22370428,22594132,22820073,23048273,23278755,23511542,23746657,23984123,24223964,24466203,24710865,24957973,25207552,25459627,25714223,25971365,26231078,26493388,26758321,27025904,27296163,27569124,27844815,28123263,28404495,28688539,28975424,29265178,29557829,29853407,30151941,30453460,30757994,31065573,31376228,31689990,32006889,32326957,32650226,32976728,33306495,33639559,33975954,34315713,34658870,35005458,35355512,35709067,36066157,36426818,36791086,37158996,37530585,37905890,38284948,38667797,39054474,39445018,39839468,40237862,40640240,41046642,41457108,41871679,42290395,42713298,43140430,43571834,44007552,44447627,44892103,45341024,45794434,46252378,46714901,47182050,47653870,48130408,48611712,49097829,49588807,50084695,50585541,51091396,51602309,52118332,52639515,53165910,53697569,54234544,54776889,55324657,55877903,56436682,57001048,57571058,58146768,58728235,59315517,59908672,60507758,61112835,61723963,62341202,62964614,63594260,64230202,64872504,65521229,66176441,66838205,67506587,68181652,68863468,69552102,70247623,70950099,71659599,72376194,73099955,73830954,74569263,75314955,76068104,76828785,77597072,78373042,79156772,79948339,80747822,81555300,82370853,83194561,84026506,84866771,85715438,86572592,87438317,88312700,89195827,90087785,90988662,91898548,92817533,93745708,94683165,95629996,96586295,97552157,98527678,99512954,100508083,101513163,102528294,103553576,104589111,105635002,106691352,107758265,108835847,109924205,111023447,112133681,113255017,114387567,115531442,116686756,117853623,119032159,120222480,121424704,122638951,123865340,125103993,126355032,127618582,128894767,130183714,131485551,132800406,134128410,135469694,136824390,138192633,139574559,140970304,142380007,143803807,145241845,146694263,148161205,149642817,151139245,152650637,154177143,155718914,157276103,158848864,160437352,162041725,163662142,165298763,166951750,168621267,170307479,172010553,173730658,175467964,177222643,178994869,180784817,182592665,184418591,186262776,188125403,190006657,191906723,193825790,195764047,197721687,199698903,201695892,203712850,205749978,207807477,209885551,211984406,214104250,216245292,218407744,220591821,222797739,225025716,227275973,229548732,231844219,234162661,236504287,238869329,241258022,243670602,246107308,248568381,251054064,253564604,256100250,258661252,261247864,263860342,266498945,269163934,271855573,274574128,277319869,280093067,282893997,285722936,288580165,291465966,294380625,297324431,300297675,303300651,306333657,309396993,312490962,315615871,318772029,321959749,325179346,328431139,331715450,335032604,338382930,341766759,345184426,348636270,352122632,355643858,359200296,362792298,366420220,370084422,373785266,377523118,381298349,385111332,388962445,392852069,396780589,400748394,404755877,408803435,412891469,417020383,421190586,425402491,429656515,433953080,438292610,442675536,447102291,451573313,456089046,460649936,465256435,469908999,474608088,479354168,484147709,488989186,493879077,498817867,503806045,508844105,513932546,519071871,524262589,529505214,534800266,540148268,545549750,551005247,556515299,562080451,567701255,573378267,579112049,584903169,590752200,596659722,602626319,608652582,614739107,620886498,627095362,633366315,639699978,646096977,652557946,659083525,665674360,672331103,679054414,685844958,692703407,699630441,706626745,713693012,720829942,728038241,735318623,742671809,750098527,757599512,765175507,772827262,780555534,788361089,796244699,804207145,812249216,820371708,828575425,836861179,845229790,853682087,862218907,870841096,879549506,888345001,897228451,906200735,915262742,924415369,933659522,942996117,952426078,961950338,971569841,981285539,991098394,1001009377,1011019470,1021129664,1031340960,1041654369,1052070912,1062591621,1073217537,1083949712,1094789209,1105737101,1116794472,1127962416,1139242040,1150634460,1162140804,1173762212,1185499834,1197354832,1209328380,1221421663,1233635879,1245972237,1258431959,1271016278,1283726440,1296563704,1309529341,1322624634,1335850880,1349209388,1362701481,1376328495,1390091779,1403992696,1418032622,1432212948,1446535077,1461000427,1475610431,1490366535,1505270200,1520322902,1535526131,1550881392,1566390205,1582054107,1597874648,1613853394,1629991927,1646291846,1662754764,1679382311,1696176134,1713137895,1730269273,1747571965,1765047684,1782698160,1800525141,1818530392,1836715695,1855082851,1873633679,1892370015,1911293715,1930406652,1949710718,1969207825,1988899903,2008788902,2028876791,2049165558,2069657213,2090353785,2111257322,2132369895,2153693593,2175230528,2196982833,2218952661,2241142187,2263553608,2286189144,2309051035,2332141545,2355462960,2379017589,2402807764,2426835841,2451104199,2475615240,2500371392,2525375105,2550628856,2576135144,2601896495,2627915459,2654194613,2680736559,2707543924,2734619363,2761965556,2789585211,2817481063,2845655873,2874112431,2902853555,2931882090,2961200910,2990812919,3020721048,3050928258,3081437540,3112251915,3143374434,3174808178,3206556259,3238621821,3271008039,3303718119,3336755300,3370122853,3403824081,3437862321,3472240944,3506963353,3542032986,3577453315,3613227848,3649360126,3685853727,3722712264,3759939386,3797538779,3835514166,3873869307,3912608000,3951734080,3991251420,4031163934,4071475573,4112190328,4153312231,4194845353,4236793806,4279161744,4321953361,4365172894,4408824622,4452912868,4497441996,4542416415,4587840579,4633718984,4680056173,4726856734,4774125301,4821866554,4870085219,4918786071,4967973931,5017653670,5067830206,5118508508,5169693593,5221390528,5273604433,5326340477,5379603881,5433399919,5487733918,5542611257,5598037369,5654017742,5710557919,5767663498,5825340132,5883593533,5942429468,6001853762,6061872299,6122491021,6183715931,6245553090,6308008620,6371088706,6434799593,6499147588,6564139063,6629780453,6696078257,6763039039,6830669429,6898976123,6967965884,7037645542,7108021997,7179102216,7250893238,7323402170,7396636191,7470602552,7545308577,7620761662,7696969278,7773938970,7851678359,7930195142,8009497093,8089592063,8170487983,8252192862,8334714790,8418061937,8502242556,8587264981,8673137630,8759869006,8847467696,8935942372,9025301795,9115554812,9206710360,9298777463,9391765237,9485682889,9580539717,9676345114,9773108565,9870839650,9969548046,10069243526,10169935961,10271635320,10374351673,10478095189,10582876140,10688704901,10795591950,10903547869,11012583347,11122709180,11233936271,11346275633,11459738389,11574335772,11690079129,11806979920,11925049719,12044300216,12164743218,12286390650,12409254556,12533347101,12658680572,12785267377,12913120050,13042251250,13172673762,13304400499,13437444503,13571818948,13707537137,13844612508,13983058633,14122889219,14264118111,14406759292,14550826884,14696335152,14843298503,14991731488,15141648802,15293065290,15445995942,15600455901,15756460460,15914025064,16073165314,16233896967,16396235936,16560198295,16725800277,16893058279,17061988861,17232608749,17404934836,17578984184,17754774025,17932321765,18111644982,18292761431,18475689045,18660445935,18847050394,19035520897,19225876105,19418134866,19612316214,19808439376,20006523769,20206589006,20408654896,20612741444,20818868858,21027057546,21237328121,21449701402,21664198416,21880840400,22099648804,22320645292,22543851744,22769290261,22996983163,23226952994,23459222523,23693814748,23930752895,24170060423,24411761027,24655878637,24902437423,25151461797,25402976414,25657006178,25913576239,26172712001,26434439121,26698783512,26965771347,27235429060,27507783350,27782861183,28060689794,28341296691,28624709657,28910956753,29200066320,29492066983,29786987652,30084857528,30385706103,30689563164,30996458795,31306423382,31619487615,31935682491,32255039315,32577589708,32903365605,33232399261,33564723253,33900370485,34239374189,34581767930,34927585609,35276861465,35629630079,35985926379,36345785642,36709243498,37076335932,37447099291,37821570283,38199785985,38581783844,38967601682,39357277698,39750850474,40148358978,40549842567,40955340992,41364894401,41778543345,42196328778,42618292065,43044474985,43474919734,43909668931,44348765620,44792253276,45240175808,45692577566,46149503341,46610998374,47077108357,47547879440,48023358234,48503591816,48988627734,49478514011,49973299151,50473032142,50977762463,51487540087,52002415487,52522439641,53047664037,53578140677,54113922083,54655061303,55201611916,55753628035,56311164315,56874275958,57443018717,58017448904,58597623393,59183599626,59775435622,60373189978,60976921877,61586691095,62202558005,62824583585,63452829420,64087357714,64728231291,65375513603,66029268739,66689561426,67356457040,68030021610,68710321826,69397425044,70091399294,70792313286,71500236418,72215238782,72937391169,73666765080,74403432730,75147467057,75898941727,76657931144,77424510455,78198755559,78980743114,79770550545,80568256050,81373938610,82187677996,83009554775,83839650322,84678046825,85524827293,86380075565,87243876320,88116315083,88997478233,89887453015,90786327545,91694190820,92611132728,93537244055,94472616495,95417342659,96371516085,97335231245,98308583557,99291669392,100284586085,101287431945,102300306264,103323309326,104356542419,105400107843,106454108921,107518650010,108593836510,109679774875,110776572623,111884338349,113003181732,114133213549,115274545684,116427291140,117591564051,118767479691,119955154487,121154706031,122366253091,123589915621,124825814777,126074072924,127334813653,128608161789,129894243406,131193185840,132505117698,133830168874,135168470562,136520155267,137885356819,139264210387,140656852490,142063421014,143484055224,144918895776,146368084733,147831765580,149310083235,150803184067,152311215907,153834328066,155372671346,156926398059,158495662039,160080618659,161681424845,163298239093,164931221483,166580533697,168246339033,169928802423,171628090447,173344371351,175077815064,176828593214,178596879146,180382847937,182186676416,184008543180,185848628611,187707114897,189584186045,191480027905,193394828184,195328776465,197282064229,199254884871,201247433719,203259908056,205292507136,207345432207,209418886529,211513075394,213628206147,215764488208,217922133090,220101354420,222302367964,224525391643,226770645559,229038352014,231328735534,233642022889,235978443117,238338227548,240721609823,243128825921,245560114180,248015715321,250495872474,253000831198,255530839509,258086147904,260667009383,263273679476,265906416270,268565480432,271251135236,273963646588,276703283053,279470315883,282265019041,285087669231,287938545923,290817931382,293726110695,296663371801,299630005519,302626305574,305652568629,308709094315,311796185258,314914147110,318063288581,321243921466,324456360680,327700924286,330977933528,334287712863,337630589991,341006895890,344416964848,347861134496,351339745840,354853143298,358401674730,361985691477,365605548391,369261603874,372954219912,376683762111,380450599732,384255105729,388097656786,391978633353,395898419686,399857403882,403855977920,407894537699,411973483075,416093217905,420254150084,424456691584,428701258499,432988271083,437318153793,441691335330,446108248683,450569331169,455075024480,459625774724,464222032471,468864252795,473552895322,478288424275,483071308517,487902021602,492781041818,497708852236,502685940758,507712800165,512789928166,517917827447,523097005721,528327975778,533611255535,538947368090,544336841770,549780210187,555278012288,560830792410,566439100334,572103491337,577824526250,583602771512,589438799227,595333187219,601286519091,607299384281,613372378123,619506101904,625701162923,631958174552,638277756297,644660533859,651107139197,657618210588,664194392693,670836336619,677544699985,684320146984,691163348453,698074981937,705055731756,712106289073,719227351963,726419625482,733683821736,741020659953,748430866552,755915175217,763474326969,771109070238,778820160940,786608362549,794474446174,802419190635,810443382541,818547816366,826733294529,835000627474,843350633748,851784140085,860301981485,868905001299,877594051311,886369991824,895233691742,904186028659,913227888945,922360167834,931583769512,940899607207,950308603279,959811689311,969409806204,979103904266,988894943308,998783892741,1008771731668,1018859448984,1029048043473,1039338523907,1049731909146,1060229228237,1070831520519,1081539835724,1092355234081,1103278786421,1114311574285,1125454690027,1136709236927,1148076329296,1159557092588,1171152663513,1182864190148,1194692832049,1206639760369,1218706157972,1230893219551,1243202151746,1255634173263,1268190514995,1280872420144,1293681144345,1306617955788,1319684135345,1332880976698,1346209786464,1359671884328,1373268603171,1387001289202,1400871302094,1414880015114,1429028815265,1443319103417,1457752294451,1472329817395,1487053115568,1501923646723,1516942883190,1532112312021,1547433435141,1562907769492,1578536847186,1594322215657,1610265437813,1626368092191,1642631773112,1659058090843,1675648671751,1692405158468,1709329210052,1726422502152,1743686727173,1761123594444,1778734830388,1796522178691,1814487400477,1832632274481,1850958597225,1869468183197,1888162865028,1907044493678,1926114938614,1945376088000,1964829848880,1984478147368,2004322928841,2024366158129,2044609819710,2065055917907,2085706477086,2106563541856,2127629177274,2148905469046,2170394523736,2192098468973,2214019453662,2236159648198,2258521244679,2281106457125,2303917521696,2326956696912,2350226263881,2373728526519,2397465811784,2421440469901,2445654874600,2470111423346,2494812537579,2519760662954,2544958269583,2570407852278,2596111930800,2622073050108,2648293780609,2674776718415,2701524485599,2728539730454,2755825127758,2783383379035,2811217212825,2839329384953,2867722678802,2896399905590,2925363904645,2954617543691,2984163719127,3014005356318,3044145409881,3074586863979,3105332732618,3136386059944,3167749920543,3199427419748,3231421693945,3263735910884,3296373269992,3329337002691,3362630372717,3396256676444,3430219243208,3464521435640,3499166649996,3534158316495,3569499899659,3605194898655,3641246847641,3677659316117,3714435909278,3751580268370,3789096071053,3826987031763,3865256902080,3903909471100,3942948565811,3982378051469,4022201831983,4062423850302,4103048088805,4144078569693,4185519355389,4227374548942,4269648294431,4312344777375,4355468225148,4399022907399,4443013136472,4487443267836,4532317700514,4577640877519,4623417286294,4669651459156,4716347973747,4763511453484,4811146568018,4859258033698,4907850614034,4956929120174,5006498411375,5056563395488,5107129029442,5158200319736,5209782322933,5261880146162,5314498947623,5367643937099,5421320376469,5475533580233,5530288916035,5585591805195,5641447723246,5697862200478,5754840822482,5812389230706,5870513123013,5929218254243,5988510436785,6048395541152,6108879496563,6169968291528,6231667974443,6293984654187,6356924500728,6420493745735,6484698683192,6549545670023,6615041126723,6681191537990,6748003453369,6815483487902,6883638322781,6952474706008,7021999453068,7092219447598,7163141642073,7234773058493,7307120789077,7380191996967,7453993916936,7528533856105,7603819194666,7679857386612,7756655960478,7834222520082,7912564745282,7991690392734,8071607296661,8152323369627,8233846603323,8316185069356,8399346920049,8483340389249,8568173793141,8653855531072,8740394086382,8827798027245,8916076007517,9005236767592,9095289135267,9186242026619,9278104446885,9370885491353,9464594346266,9559240289728,9654832692625,9751381019551,9848894829746,9947383778043,10046857615823,10147326191981,10248799453900,10351287448439,10454800322923,10559348326152,10664941809413,10771591227507,10879307139782,10988100211179,11097981213290,11208961025422,11321050635676,11434261142032,11548603753452,11664089790986,11780730688895,11898537995783,12017523375740,12137698609497,12259075595591,12381666351546,12505483015061,12630537845211,12756843223663,12884411655899,13013255772457,13143388330181,13274822213482,13407570435616,13541646139972,13677062601371,13813833227384,13951971559657,14091491275253,14232406188005,14374730249885,14518477552383,14663662327906,14810298951185,14958401940696,15107985960102,15259065819703,15411656477900,15565773042679,15721430773105,15878645080836,16037431531644,16197805846960,16359783905429,16523381744483,16688615561927,16855501717546,17024056734721,17194297302068,17366240275088,17539902677838,17715301704616,17892454721662,18071379268878,18252093061566,18434613992181,18618960132102,18805149733423,18993201230757,19183133243064,19374964575494,19568714221248,19764401363460,19962045377094,20161665830864,20363282489172,20566915314063,20772584467203,20980310311875,21190113414993,21402014549142,21616034694633,21832195041579,22050516991994,22271022161913,22493732383532,22718669707367,22945856404440,23175314968484,23407068118168,23641138799349,23877550187342,24116325689215,24357488946107,24601063835568,24847074473923,25095545218662,25346500670848,25599965677556,25855965334331,26114524987674,26375670237550,26639426939925,26905821209324,27174879421417,27446628215631,27721094497787,27998305442764,28278288497191,28561071382162,28846682095983,29135148916942,29426500406111,29720765410172,30017973064273,30318152794915,30621334322864,30927547666092,31236823142752,31549191374179,31864683287920,32183330120799,32505163422006,32830215056226,33158517206788,33490102378855,33825003402643,34163253436669,34504885971035,34849934830745,35198434179052,35550418520842,35905922706050,36264981933110,36627631752441,36993908069965,37363847150664,37737485622170,38114860478391,38496009083174,38880969174005,39269778865745,39662476654402,40059101420946,40459692435155,40864289359506,41272932253101,41685661575632,42102518191388,42523543373301,42948778807034,43378266595104,43812049261055,44250169753665,44692671451201,45139598165713,45590994147370,46046904088843,46507373129731,46972446861028,47442171329638,47916593042934,48395758973363,48879716563096,49368513728726,49862198866013,50360820854673,50864429063219,51373073353851,51886804087389,52405672128262,52929728849544,53459026138039,53993616399419,54533552563413,55078888089047,55629676969937,56185973739636,56747833477032,57315311811802,57888464929920,58467349579219,59052023075011,59642543305761,60238968738818,60841358426206,61449772010468,62064269730572,62684912427877,63311761552155,63944879167676,64584327959352,65230171238945,65882472951334,66541297680847,67206710657655,67878777764231,68557565541873,69243141197291,69935572609263,70634928335355,71341277618708,72054690394895,72775237298843,73502989671831,74238019568549,74980399764234,75730203761876,76487505799494,77252380857488,78024904666062,78805153712722,79593205249849,80389137302347,81193028675370,82004958962123,82825008551744,83653258637261,84489791223633,85334689135869,86188036027227,87049916387499,87920415551373,88799619706886,89687615903954,90584492062993,91490336983622,92405240353458,93329292756992,94262585684561,95205211541406,96157263656820,97118836293388,98090024656321,99070924902884,100061634151912,101062250493431,102072872998365,103093601728348,104124537745631,105165783123087,106217440954317,107279615363860,108352411517498,109435935632672,110530294988998,111635597938887,112751953918275,113879473457457,115018268192031,116168450873951,117330135382690,118503436736516,119688471103881,120885355814919,122094209373068,123315151466798,124548302981465,125793786011279,127051723871391,128322241110104,129605463521205,130901518156417,132210533337981,133532638671360,134867965058073,136216644708653,137578811155739,138954599267296,140344145259968,141747586712567,143165062579692,144596713205488,146042680337542,147503107140917,148978138212326,150467919594449,151972598790393,153492324778296,155027248026078,156577520506338,158143295711401,159724728668515,161321975955200,162935195714752,164564547671899,166210193148618,167872295080104,169551018030905,171246528211214,172958993493326,174688583428259,176435469262541,178199823955166,179981822194717,181781640416664,183599456820830,185435451389038,187289805902928,189162703961957,191054331001576,192964874311591,194894523054706,196843468285253,198811902968105,200800021997786,202808022217763,204836102439940,206884463464339,208953308098982,211042841179971,213153269591770,215284802287687,217437650310563,219612026813668,221808147081804,224026228552622,226266490838148,228529155746529,230814447303994,233122591777033,235453817694803,237808355871751,240186439430468,242588303824772,245014186863019,247464328731649,249938972018965,252438361739154,254962745356545,257512372810110,260087496538211,262688371503593,265315255218628,267968407770814,270648091848522,273354572767007,276088118494677,278848999679623,281637489676419,284453864573183,287298403218914,290171387251103,293073101123614,296003832134850,298963870456198,301953509160760,304973044252367,308022774694890,311103002441838,314214032466256,317356172790918,320529734518827,323735031864015,326972382182655,330242106004481,333544527064525,336879972335170,340248772058521,343651259779106,347087772376897,350558650100666,354064236601672,357604878967688,361180927757364,364792737034937,368440664405286,372125071049338,375846321759831,379604784977429,383400832827203,387234841155475,391107189567029,395018261462699,398968444077326,402958128518099,406987709803280,411057586901312,415168162770325,419319844398028,423513042842008,427748173270428,432025655003132,436345911553163,440709370668694,445116464375380,449567629019133,454063305309324,458603938362417,463189977746041,467821877523501,472500096298736,477225097261723,481997348234340,486817321716683,491685494933849,496602349883187,501568373382018,506584057115838,511649897686996,516766396663865,521934060630503,527153401236808,532424935249176,537749184601667,543126676447683,548557943212159,554043522644280,559583957870722,565179797449429,570831595423923,576539911378162,582305310491943,588128363596862,594009647232830,599949743705158,605949241142209,612008733553631,618128820889167,624310109098058,630553210189038,636858742290928,643227329713837,649659603010975,656156199041084,662717761031494,669344938641809,676038388028227,682798771908509,689626759627594,696523027223870,703488257496108,710523140071069,717628371471779,724804655186496,732052701738361,739373228755744,746766961043301,754234630653734,761776976960271,769394746729873,777088694197171,784859581139142,792708176950533,800635258720038,808641611307238,816728027420310,824895307694513,833144260771458,841475703379172,849890460412963,858389365017092,866973258667262,875642991253934,884399421166473,893243415378137,902175849531918,911197608027237,920309584107509,929512679948584,938807806748069,948195884815549,957677843663704,967254622100341,976927168321344,986696440004557,996563404404602,1006529038448648,1016594328833134,1026760272121465,1037027874842679,1047398153591105,1057872135127016,1068450856478286,1079135365043068,1089926718693498,1100825985880433,1111834245739237,1122952588196629,1134182114078595,1145523935219381,1156979174571574,1168548966317289,1180234455980462,1192036800540266,1203957168545668,1215996740231124,1228156707633435,1240438274709769,1252842657456866,1265371084031434,1278024794871748,1290805042820465,1303713093248669,1316750224181155,1329917726422966,1343216903687195,1356649072724067,1370215563451307,1383917719085820,1397756896276678,1411734465239444,1425851809891838,1440110327990756,1454511431270663,1469056545583369,1483747111039202,1498584582149594,1513570427971090,1528706132250801,1543993193573309,1559433125509042,1575027456764132,1590777731331773,1606685508645090,1622752363731541,1638979887368856,1655369686242544,1671923383104969,1688642616936018,1705529043105378,1722584333536431,1739810176871795,1757208278640513,1774780361426918,1792528165041187,1810453446691599,1828557981158515,1846843560970100,1865311996579801,1883965116545599,1902804767711055,1921832815388165,1941051143542046,1960461654977466,1980066271527240,1999866934242512,2019865603584937,2040064259620786,2060464902216994,2081069551239164,2101880246751555,2122899049219070,2144128039711260,2165569320108372,2187225013309455,2209097263442549,2231188236076974,2253500118437744,2276035119622121,2298795470818342,2321783425526525,2345001259781790,2368451272379608,2392135785103404,2416057142954438,2440217714383982,2464619891527822,2489266090443100,2514158751347531,2539300338861006,2564693342249616,2590340275672112,2616243678428833,2642406115213121,2668830176365252,2695518478128904,2722473662910193,2749698399539295,2777195383534688,2804967337370035,2833017010743735,2861347180851172,2889960652659683,2918860259186280,2948048861778143,2977529350395924,3007304643899883,3037377690338882,3067751467242271,3098428981914693,3129413271733840,3160707404451178,3192314478495690,3224237623280647,3256479999513453,3289044799508587,3321935247503673,3355154599978710,3388706145978497,3422593207438282,3456819139512665,3491387330907791,3526301204216869,3561564216259037,3597179858421627,3633151657005843,3669483173575901,3706178005311660,3743239785364776,3780672183218424,3818478905050608,3856663694101114,3895230331042125,3934182634352546,3973524460696071,4013259705303031,4053392302356061,4093926225379621,4134865487633417,4176214142509751,4217976283934848,4260156046774196,4302757607241938,4345785183314357,4389243035147500,4433135465498975,4477466820153965,4522241488355505,4567463903239060,4613138542271451,4659269927694166,4705862626971108,4752921253240819,4800450465773227,4848454970430959,4896939520135269,4945908915336622,4995368004489988,5045321684534888,5095774901380237,5146732650394039,5198199976897979,5250181976666959,5302683796433629,5355710634397965,5409267740741945,5463360418149364,5517994022330858,5573173962554167,5628905702179709,5685194759201506,5742046706793521,5799467173861456,5857461845600071,5916036464056072,5975196828696633,6034948796983599,6095298284953435,6156251267802969,6217813780480999,6279991918285809,6342791837468667,6406219755843354,6470281953401788,6534984772935806,6600334620665164,6666337966871816,6733001346540534,6800331360005939,6868334673605998,6937018020342058,7006388200545479,7076452082550934,7147216603376443,7218688769410207,7290875657104309,7363784413675352,7437422257812106,7511796480390227,7586914445194129,7662783589646070,7739411425542531,7816805539797956,7894973595195936,7973923331147895,8053662564459374,8134199190103968,8215541182005008,8297696593825058,8380673559763309,8464480295360942,8549125098314551,8634616349297697,8720962512790674,8808172137918581,8896253859297767,8985216397890745,9075068561869652,9165819247488348,9257477439963232,9350052214362864,9443552736506492,9537988263871558,9633368146510274,9729701827975376,9826998846255130,9925268834717682,10024521523064858,10124766738295506,10226014405678462,10328274549735246,10431557295232598,10535872868184924,10641231596866774,10747643912835442,10855120351963796,10963671555483434,11073308271038268,11184041353748650,11295881767286136,11408840584958998,11522928990808588,11638158280716674,11754539863523840,11872085262159078,11990806114780668,12110714175928474,12231821317687758,12354139530864636,12477680926173282,12602457735435014,12728482312789364,12855767135917258,12984324807276430,13114168055349194,13245309735902686,13377762833261712,13511540461594330,13646655866210274,13783122424872376,13920953649121100,14060163185612312,14200764817468436,14342772465643120,14486200190299552,14631062192202548,14777372814124574,14925146542265820,15074398007688478,15225141987765362,15377393407643016,15531167341719446,15686479015136640,15843343805288006,16001777243340886,16161795015774296,16323412965932040,16486647095591360,16651513566547274,16818028702212746,16986208989234874,17156071079127222,17327631789918494,17500908107817680,17675917188895856,17852676360784814,18031203124392664,18211515155636592,18393630307192960,18577566610264888,18763342276367536,18950975699131212,19140485456122524,19331890310683748,19525209213790584,19720461305928492,19917665918987776,20116842578177652,20318011003959428,20521191113999024,20726403025139016,20933667055390408,21143003725944312,21354433763203756,21567978100835792,21783657881844152,22001494460662592,22221509405269220,22443724499321912,22668161744315132,22894843361758284,23123791795375868,23355029713329628,23588580010462924,23824465810567552,24062710468673228,24303337573359960,24546370949093560,24791834658584496,25039753005170340,25290150535222044,25543052040574264,25798482560980008,26056467386589808,26317032060455708,26580202381060264,26846004404870868,27114464448919576,27385609093408772,27659465184342860,27936059836186288,28215420434548152,28497574638893632,28782550385282568,29070375889135392,29361079648026748,29654690444507016,29951237348952088,30250749722441608,30553257219666024,30858789791862684,31167377689781312,31479051466679124,31793841981345916,32111780401159376,32432898205170972,32757227187222684,33084799459094912,33415647453685860,33749803928222720,34087301967504948,34428174987179996,34772456737051796,35120181304422316,35471383117466540,35826096948641204,36184357918127616,36546201497308896,36911663512281984,37280780147404808,37653587948878856,38030123828367648,38410425066651328,38794529317317840,39182474610491016,39574299356595928,39970042350161888,40369742773663504,40773440201400136,41181174603414136,41592986349448280,42008916212942760,42429005375072184,42853295428822904,43281828383111136,43714646666942248,44151793133611672,44593311064947792,45039244175597272,45489636617353248,45944532983526784,46403978313362056,46868018096495680,47336698277460640,47810065260235248,48288165912837600,48771047571965976,49258758047685640,49751345628162496,50248859084444120,50751347675288560,51258861152041448,51771449763561864,52289164261197480,52812055903809456,53340176462847552,53873578227476024,54412314009750784,54956437149848296,55506001521346776,56061061536560248,56621672151925848,57187888873445104,57759767762179552,58337365439801352,58920739094199368,59509946485141360,60105045949992776,60706096409492704,61313157373587632,61926288947323512,62545551836796744,63171007355164712,63802717428716360,64440744603003528,65085152049033560,65736003569523896,66393363605219136,67057297241271328,67727870213684040,68405148915820880,69089200404979088,69780092409028880,70477893333119168,71182672266450360,71894498989114864,72613443979006016,73339578418796080,74072974202984048,74813703945013888,75561840984464032,76317459394308672,77080633988251760,77851440328134272,78629954731415616,79416254278729776,80210416821517072,81012520989732240,81822646199629568,82640872661625872,83467281388242128,84301954202124544,85144973744145792,85996423481587248,86856387716403120,87724951593567152,88602201109502832,89488223120597856,90383105351803840,91286936405321872,92199805769375088,93121803827068832,94053021865339520,94993552083992912,95943487604832848,96902922480881184,97871951705690000,98850671222746896,99839177934974368,100837569714324112,101845945411467360,102864404865582032,103893048914237856,104931979403380240,105981299197414048,107041112189388192,108111523311282080,109192638544394896,110284564929838848,111387410579137232,112501284684928608,113626297531777888,114762560507095664,115910186112166624,117069287973288288,118239980853021168,119422380661551376,120616604468166896,121822770512848560,123040998217977040,124271408200156816,125514122282158384,126769263504979968,128036956140029776,129317325701430080,130610498958444384,131916603948028832,133235769987509120,134568127687384208,135913808964258048,137272947053900624,138645676524439632,140032133289684032,141432454622580880,142846779168806688,144275246960494752,145717999430099712,147175179424400704,148646931218644704,150133400530831168,151634734536139488,153151081881500896,154682592700315904,156229418627319072,157791712813592256,159369629941728192,160963326241145472,162572959503556928,164198689098592512,165840675989578432,167499082749474208,169174073576968960,170865814312738656,172574472455866048,174300217180424704,176043219352228960,177803651545751264,179581688061208768,181377504941820864,183191279991239072,185023192791151456,186873424719062976,188742158966253600,190629580555916128,192535876361475296,194461235125090048,196405847476340960,198369905951104384,200353605010615424,202357141060721568,204380712471328800,206424519596042080,208488764792002496,210573652439922528,212679388964321760,214806182853964992,216954244682504640,219123787129329696,221315025000623008,223528175250629248,225763457003135552,228021091573166912,230301302488898592,232604315513787584,234930358668925472,237279662255614720,239652458878170880,242048983466952576,244469473301622112,246914168034638336,249383309714984736,251877142812134592,254395914240255936,256939873382658496,259509272116485088,262104364837649952,264725408486026464,267372662570886720,270046389196595584,272746853088561536,275474321619447168,278229064835641632,281011355483998048,283821469038838016,286659683729226400,289526280566518656,292421543372183872,295345758805905728,298299216393964800,301282208557904448,304295030643483520,307337980949918336,310411360759417536,313515474367011712,316650629110681856,319817135401788672,323015306755806592,326245459823364672,329507914421598336,332802993565814336,336131023501472512,339492333736487232,342887257073852096,346316129644590592,349779290941036480,353277083850446848,356809854688951296,360377953235840832,363981732768199232,367621550095881216,371297765596840000,375010743252808384,378760850685336448,382548459192189824,386373943784111744,390237683221952896,394140060054172416,398081460654714112,402062275261261248,406082898013873856,410143726994012608,414245164263952768,418387615906592320,422571492065658240,426797206986314816,431065179056177984,435375830846739776,439729589155207168,444126885046759232,448568153897226816,453053835436199104,457584373790561088,462160217528466688,466781819703751360,471449637900788864,476164134279796736,480925775622594688,485735033378820608,490592383712608832,495498307549734912,500453290625232256,505457823531484608,510512401766799488,515617525784467456,520773701042312128,525981438052735232,531241252433262592,536553664957595200,541919201607171136,547338393623242880,552811777559475328,558339895335070080,563923294288420800,569562527231305024,575258152503618048,581010734028654208,586820841368940800,592689049782630272,598615940280456576,604602099683261184,610648120680093824,616754601886894720,622922147905763712,629151369384821376,635442883078669568,641797311909456256,648215285028550784,654697437878836352,661244412257624704,667856856380200960,674535424944002944,681280779193442944,688093586985377408,694974522855231232,701924268083783552,708943510764621440,716032945872267648,723193275330990336,730425208084300288,737729460165143296,745106754766794752,752557822314462720,760083400537607296,767684234542983424,775361076888413312,783114687657297408,790945834533870336,798855292879209088,806843845808001152,814912284266081152,823061407108742016,831292021179829504,839604941391627776,848000990805544064,856481000713599488,865045810720735488,873696268827942912,882433231516222336,891257563831384576,900170139469698432,909171840864395392,918263559273039360,927446194865769728,936720656814427392,946087863382571648,955548742016397312,965104229436561280,974755271730926848,984502824448236160,994347852692718592,1004291331219645824 };
	scanf("%lld", &x);
	int min=0,med=1880,Max=3760;
	while (Max-min>2) {
		if (x >= y[med]) min = med;
		if (x <= y[med]) Max = med;
		med = (min + Max) / 2;
	}
	printf("%d", y[min]==x?min:Max);
}