var k:longint;
begin
assign(input,'2015coin.in');reset(input);
assign(output,'2015coin.out');rewrite(output);
readln(k);
if( k>0 )and (k<=1) then writeln(1);
if (k>1)and (k<=3)then writeln(1+2*(k-1));
if (k>3)and (k<=6)then writeln(5+3*(k-3));
if (k>6)and (k<=10)then writeln(14+4*(k-6));
if (k>10)and (k<=15)then writeln(30+5*(k-10));
if (k>15)and (k<=21)then writeln(55+6*(k-15));
if (k>21)and (k<=28)then writeln(91+7*(k-21));
if (k>28)and (k<=36)then writeln(140+8*(k-28));
if (k>36)and (k<=45)then writeln(204+9*(k-36));
if (k>45)and (k<=55)then writeln(285+10*(k-45));
if (k>55)and (k<=66)then writeln(385+11*(k-55));
if (k>66)and (k<=78)then writeln(506+12*(k-66));
if (k>78)and (k<=91)then writeln(650+13*(k-78));
if (k>91)and (k<=105)then writeln(819+14*(k-91));
if (k>105)and (k<=120)then writeln(1015+15*(k-105));
if (k>120)and (k<=136)then writeln(1240+16*(k-120));
if (k>136)and (k<=153)then writeln(1496+17*(k-136));
if (k>153)and (k<=171)then writeln(1785+18*(k-153));
if (k>171)and (k<=190)then writeln(2109+19*(k-171));
if (k>190)and (k<=210)then writeln(2470+20*(k-190));
if (k>210)and (k<=231)then writeln(2870+21*(k-210));
if (k>231)and (k<=253)then writeln(3311+22*(k-231));
if (k>253)and (k<=276)then writeln(3795+23*(k-253));
if (k>276)and (k<=300)then writeln(4324+24*(k-276));
if (k>300)and (k<=325)then writeln(4900+25*(k-300));
if (k>325)and (k<=351)then writeln(5525+26*(k-325));
if (k>351)and (k<=378)then writeln(6201+27*(k-351));
if (k>378)and (k<=406)then writeln(6930+28*(k-378));
if (k>406)and (k<=435)then writeln(7714+29*(k-406));
if (k>435)and (k<=465)then writeln(8555+30*(k-435));
if (k>465)and (k<=496)then writeln(9455+31*(k-465));
if (k>496)and (k<=528)then writeln(10416+32*(k-496));
if (k>528)and (k<=561)then writeln(11440+33*(k-528));
if (k>561)and (k<=595)then writeln(12529+34*(k-561));
if (k>595)and (k<=630)then writeln(13685+35*(k-595));
if (k>630)and (k<=666)then writeln(14910+36*(k-630));
if (k>666)and (k<=703)then writeln(16206+37*(k-666));
if (k>703)and (k<=741)then writeln(17575+38*(k-703));
if (k>741)and (k<=780)then writeln(19019+39*(k-741));
if (k>780)and (k<=820)then writeln(20540+40*(k-780));
if (k>820)and (k<=861)then writeln(22140+41*(k-820));
if (k>861)and (k<=903)then writeln(23821+42*(k-861));
if (k>903)and (k<=946)then writeln(25585+43*(k-903));
if (k>946)and (k<=990)then writeln(27434+44*(k-946));
if (k>990)and (k<=1035)then writeln(29370+45*(k-990));
if (k>1035)and (k<=1081)then writeln(31395+46*(k-1035));
if (k>1081)and (k<=1128)then writeln(33511+47*(k-1081));
if (k>1128)and (k<=1176)then writeln(35720+48*(k-1128));
if (k>1176)and (k<=1225)then writeln(38024+49*(k-1176));
if (k>1225)and (k<=1275)then writeln(40425+50*(k-1225));
if (k>1275)and (k<=1326)then writeln(42925+51*(k-1275));
if (k>1326)and (k<=1378)then writeln(45526+52*(k-1326));
if (k>1378)and (k<=1431)then writeln(48230+53*(k-1378));
if (k>1431)and (k<=1485)then writeln(51039+54*(k-1431));
if (k>1485)and (k<=1540)then writeln(53955+55*(k-1485));
if (k>1540)and (k<=1596)then writeln(56980+56*(k-1540));
if (k>1596)and (k<=1653)then writeln(60116+57*(k-1596));
if (k>1653)and (k<=1711)then writeln(63365+58*(k-1653));
if (k>1711)and (k<=1770)then writeln(66729+59*(k-1711));
if (k>1770)and (k<=1830)then writeln(70210+60*(k-1770));
if (k>1830)and (k<=1891)then writeln(73810+61*(k-1830));
if (k>1891)and (k<=1953)then writeln(77531+62*(k-1891));
if (k>1953)and (k<=2016)then writeln(81375+63*(k-1953));
if (k>2016)and (k<=2080)then writeln(85344+64*(k-2016));
if (k>2080)and (k<=2145)then writeln(89440+65*(k-2080));
if (k>2145)and (k<=2211)then writeln(93665+66*(k-2145));
if (k>2211)and (k<=2278)then writeln(98021+67*(k-2211));
if (k>2278)and (k<=2346)then writeln(102510+68*(k-2278));
if (k>2346)and (k<=2415)then writeln(107134+69*(k-2346));
if (k>2415)and (k<=2485)then writeln(111895+70*(k-2415));
if (k>2485)and (k<=2556)then writeln(116795+71*(k-2485));
if (k>2556)and (k<=2628)then writeln(121836+72*(k-2556));
if (k>2628)and (k<=2701)then writeln(127020+73*(k-2628));
if (k>2701)and (k<=2775)then writeln(132349+74*(k-2701));
if (k>2775)and (k<=2850)then writeln(137825+75*(k-2775));
if (k>2850)and (k<=2926)then writeln(143450+76*(k-2850));
if (k>2926)and (k<=3003)then writeln(149226+77*(k-2926));
if (k>3003)and (k<=3081)then writeln(155155+78*(k-3003));
if (k>3081)and (k<=3160)then writeln(161239+79*(k-3081));
if (k>3160)and (k<=3240)then writeln(167480+80*(k-3160));
if (k>3240)and (k<=3321)then writeln(173880+81*(k-3240));
if (k>3321)and (k<=3403)then writeln(180441+82*(k-3321));
if (k>3403)and (k<=3486)then writeln(187165+83*(k-3403));
if (k>3486)and (k<=3570)then writeln(194054+84*(k-3486));
if (k>3570)and (k<=3655)then writeln(201110+85*(k-3570));
if (k>3655)and (k<=3741)then writeln(208335+86*(k-3655));
if (k>3741)and (k<=3828)then writeln(215731+87*(k-3741));
if (k>3828)and (k<=3916)then writeln(223300+88*(k-3828));
if (k>3916)and (k<=4005)then writeln(231044+89*(k-3916));
if (k>4005)and (k<=4095)then writeln(238965+90*(k-4005));
if (k>4095)and (k<=4186)then writeln(247065+91*(k-4095));
if (k>4186)and (k<=4278)then writeln(255346+92*(k-4186));
if (k>4278)and (k<=4371)then writeln(263810+93*(k-4278));
if (k>4371)and (k<=4465)then writeln(272459+94*(k-4371));
if (k>4465)and (k<=4560)then writeln(281295+95*(k-4465));
if (k>4560)and (k<=4656)then writeln(290320+96*(k-4560));
if (k>4656)and (k<=4753)then writeln(299536+97*(k-4656));
if (k>4753)and (k<=4851)then writeln(308945+98*(k-4753));
if (k>4851)and (k<=4950)then writeln(318549+99*(k-4851));
if (k>4950)and (k<=5050)then writeln(328350+100*(k-4950));
if (k>5050)and (k<=5151)then writeln(338350+101*(k-5050));
if (k>5151)and (k<=5253)then writeln(348551+102*(k-5151));
if (k>5253)and (k<=5356)then writeln(358955+103*(k-5253));
if (k>5356)and (k<=5460)then writeln(369564+104*(k-5356));
if (k>5460)and (k<=5565)then writeln(380380+105*(k-5460));
if (k>5565)and (k<=5671)then writeln(391405+106*(k-5565));
if (k>5671)and (k<=5778)then writeln(402641+107*(k-5671));
if (k>5778)and (k<=5886)then writeln(414090+108*(k-5778));
if (k>5886)and (k<=5995)then writeln(425754+109*(k-5886));
if (k>5995)and (k<=6105)then writeln(437635+110*(k-5995));
if (k>6105)and (k<=6216)then writeln(449735+111*(k-6105));
if (k>6216)and (k<=6328)then writeln(462056+112*(k-6216));
if (k>6328)and (k<=6441)then writeln(474600+113*(k-6328));
if (k>6441)and (k<=6555)then writeln(487369+114*(k-6441));
if (k>6555)and (k<=6670)then writeln(500365+115*(k-6555));
if (k>6670)and (k<=6786)then writeln(513590+116*(k-6670));
if (k>6786)and (k<=6903)then writeln(527046+117*(k-6786));
if (k>6903)and (k<=7021)then writeln(540735+118*(k-6903));
if (k>7021)and (k<=7140)then writeln(554659+119*(k-7021));
if (k>7140)and (k<=7260)then writeln(568820+120*(k-7140));
if (k>7260)and (k<=7381)then writeln(583220+121*(k-7260));
if (k>7381)and (k<=7503)then writeln(597861+122*(k-7381));
if (k>7503)and (k<=7626)then writeln(612745+123*(k-7503));
if (k>7626)and (k<=7750)then writeln(627874+124*(k-7626));
if (k>7750)and (k<=7875)then writeln(643250+125*(k-7750));
if (k>7875)and (k<=8001)then writeln(658875+126*(k-7875));
if (k>8001)and (k<=8128)then writeln(674751+127*(k-8001));
if (k>8128)and (k<=8256)then writeln(690880+128*(k-8128));
if (k>8256)and (k<=8385)then writeln(707264+129*(k-8256));
if (k>8385)and (k<=8515)then writeln(723905+130*(k-8385));
if (k>8515)and (k<=8646)then writeln(740805+131*(k-8515));
if (k>8646)and (k<=8778)then writeln(757966+132*(k-8646));
if (k>8778)and (k<=8911)then writeln(775390+133*(k-8778));
if (k>8911)and (k<=9045)then writeln(793079+134*(k-8911));
if (k>9045)and (k<=9180)then writeln(811035+135*(k-9045));
if (k>9180)and (k<=9316)then writeln(829260+136*(k-9180));
if (k>9316)and (k<=9453)then writeln(847756+137*(k-9316));
if (k>9453)and (k<=9591)then writeln(866525+138*(k-9453));
if (k>9591)and (k<=9730)then writeln(885569+139*(k-9591));
if (k>9730)and (k<=9870)then writeln(904890+140*(k-9730));
if (k>9870)and (k<=10011)then writeln(924490+141*(k-9870));
close(input);
close(output);
end.