{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cimg src\u003d\"CDN_BASE_URL/97f9540cc3aee3b2990c66e5f0eb9293?v\u003d1713671731\" border\u003d\"0\" alt\u003d\"Problem illustration\" align\u003d\"RIGHT\" class\u003d\"problem_raimage\"\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eA chilly autumn night. Well wrapped up in a coat, a man is rapidly walking \r\nalong a gray street. This is the Tradition Keeper of the ACM club in Ural \r\nState University. Drizzle and dull sky have always turned him \r\nnostalgic. And here we go again, the Tradition Keeper is bringing back the \r\nmemories of distant past when Ural Federal University wasn\u0027t yet existing, \r\nand the story of Team.GOV was only starting. Indeed, this story deserves \r\nto be preserved for descendants. However, the details are slipping from \r\nthe Keeper\u0027s mind and he seems to need an archive. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003e4 Turgeneva st. The sixth floor, home Department of Mathematics and \r\nMechanics where the Keeper himself has been studying a long time ago. Long \r\ncorridors, narrow light bars on the floor, dark corners and eventually an \r\noffice with ACM archive. The Keeper opened the door and found himself in a \r\ncramp room with numerous racks. Dozens of boxes and piles of paper are \r\ndumped near the walls. On one box three letters glittered with gold\u0026nbsp;— GOV. \r\nThe Keeper stepped to the box, drew a heavy file and opened it. On the \r\nfirst page in the right upper corner there was a photo of a smiling young \r\nman with curly hair and a subscript: “Vadik Kantorov, the permanent \r\ncaptain of Team.GOV”. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eRight after Vadik had entered University he played a few tricks and got into \r\nthe half-ready team of Alex E. and Misha. Alex E. had been a bright \r\nprogrammer even he was a schoolar and so troubled the ACM old-timers. Thus, Alex E. \r\nwas ready to name the team: “Alarm”. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eSo the Vadik\u0027s ACM-career began. The team existed during a year. \r\nThe first battle was the Ural SU Championship where Alarm\r\ntook only the fifth place and allayed the veterans\u0027 fear. Next \r\ncontest was the ACM ICPC subregional contest. The team played slightly better \r\nand took the seventh place out of all teams from Ural region, and the \r\nthird out of teams from Ural SU. Alarm became the third freshmen \r\nteam in the Ural SU history to qualify for the regional contest in St. Petersburg. \r\nUnfortunately, on the regional contest the team scored 86th and broke the \r\nrecord of lowest position of Ural SU teams. It \r\nwas a hard hit for the team. The choice had to be made: practice a lot, \r\nleave programming contests or keep performing poorly. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003ePutting back the decision, the team participated in the Ural Championship, \r\nand scored 19th of all teams and 5th of Ural SU teams. That very moment it \r\nbecame clear that the line-up had to change. However, before the Ural \r\nChampionship Alarm had applied to the Tatarstan Championship where the \r\nteam\u0027s final battle took place. The team could not even solve a half of the \r\noffered problems and did not make in the best ten teams (11th place). On \r\nthe way back in a train it was decided that Misha had to \u003ca href\u003d\"https://acm.timus.ru/problem.aspx?space\u003d1\u0026amp;num\u003d1728\"\u003equit the team\u003c/a\u003e.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIn the new season the team needed a new name. Here the preamble is \r\ncompleted and the story of Team.GOV commences. The team consisted of two \r\nmembers having little experience and even less success. A new name was \r\ndefined\u0026nbsp;— Team.GOV. After long considerations Vadik figured out that the \r\nteam missed a strong mathematician. Sasha who had been Vadik\u0027s high school \r\nfriend was picked to fill this role. With Sasha\u0027s appearance everyone felt \r\nthat everything was going to run smoothly. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe time of Ural SU Championship came, the autumn of 2008, second \r\nuniversity year. In unclear circumstances Sasha has not come to the \r\ncontest, but even in that case Team.GOV was second best of Ural SU teams. \r\nOne-year experience paid off! Sasha did come to the subregional contest \r\nbut the team reached only 14th place and did not qualify for the regional \r\ncontest. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eLuckily, Ural SU as the host of the subregional contests has a right to \r\nsend one extra team to the regional contest. After long negotiations \r\nTeam.GOV could make it to the regional contest but with \u003ca href\u003d\"https://acm.timus.ru/problem.aspx?space\u003d1\u0026amp;num\u003d1688\"\u003ea sudden change\u003c/a\u003e in the line-up\u0026nbsp;— Ivan B. came instead of Sasha. The replacement turned out to be fruitful\u0026nbsp;— 76th place (+10 to Alarm\u0027s achievement).\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eAfter returning home Ivan B. found another team, thus Team.GOV had to fix \r\nthe line-up again. Nikita was invited as the third player for the Ural \r\nChampionship. On the qualification contest Vadik, Nikita and Alex E. played \r\nvery well: the team scored second of Ural SU teams. \r\nTruly an astounding success! \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eBeing very enthusiastic Vadik and Nikita came to the Ural Championship. \r\nFor some strange reason Alex E. did not come. The team performed very poorly \r\nyet another time\u0026nbsp;— 25th place of all teams and 5th of Ural SU teams. \r\nNikita was not satisfied with such attitude and Team.GOV became only two players\r\nagain\u0026nbsp;— Alex E. and Vadik. What a curse! The team started to search for the \r\nthird player. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eAnd the next season came\u0026nbsp;— it\u0027s been two years since Vadik entered Ural \r\nSU. The search for the third teammate was completed successfully. Senior \r\nstudent Fedor was very experienced and had been practicing since 9th \r\ngrade of high school. Bright future was ahead of the team. \r\nThe curse was over and Team.GOV played three official contests \r\nwith the same line-up. The team scored 12th on the subregional contest, \r\nsafely advanced to the regional, and then took the third place on the Ural \r\nSU Championship. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe regional contest in St. Petersburg yielded a diploma and the 61st \r\nplace, which was +15 to the previous year\u0027s position. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eHaving returned from St. Petersburg, Team.GOV participated in a unique \r\ncompetition of ACM ICPC veterans and current teams\u0026nbsp;— Battle of \r\nGenerations. Sadly, Alex E. couldn\u0027t come but team figured it out\u0026nbsp;— Ivan K. \r\ncame to the rescue and replaced Alex E. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eAlex E. wasn\u0027t keeping fit: no practice, light attitude to contests\u0026nbsp;— Vadik \r\nbegan to look for a replacement. Nikita accepted the invitation cheerfully \r\nonce he heard of Alex E. quitting the team. The first contest after his \r\nreturn to Team.GOV was qualification for the Ural Championship. \r\nSuddenly Vadik had some urgent business in Europe, so Fedor and Nikita \r\nparticipated without him. They performed quite well and solved as many problems \r\nas the leaders did. As a result, the team got the third place and \r\nqualified for the Ural Championship. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe Ural Championship brought a new grief: 25th place out of all teams, \r\nand 4th out of Ural SU teams. Fedor and Nikita couldn\u0027t hold the nerves, \r\nand Vadik had to look for new teammates all over again. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe fourth and the last year of university. Vadik wanted to put an end to \r\nhis ACM-career and he needed a new team. The veterans recommended to take \r\nyoung and promising Den. Vadik conducted a little test, and \u003ca href\u003d\"https://acm.timus.ru/problem.aspx?space\u003d1\u0026amp;num\u003d1851\"\u003eDen was taken\u003c/a\u003e. Only a few days were left before the Ural SU Championship, almost all the teams were formed, while Vadik was still answering his eternal question\u0026nbsp;— where to get the third team member? Accidentally he found that Egor was looking for a new team after his previous team broke apart. A new line-up \r\nof Team.GOV was born. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOn the Ural SU Championship Team.GOV failed again and got only 5th place. \r\nSubregional contest wasn\u0027t successful as well\u0026nbsp;— 9th place out of all \r\nteams and 4th out of Ural SU teams. Ural SU got an extended quota and \r\nTeam.GOV was going to St. Petersburg again. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eBefore St. Petersburg Team.GOV needed a serious practice session. \r\nAll-Siberian Olympiad was a perfect shot. Team.GOV went to Novosibirsk and \r\ndiscovered again how weak they were: 39th place out of all teams and the \r\nworst performance out of Ural SU teams. So the guys set out to St. \r\nPetersburg with great leisure plans. Well, taking part counts no less than \r\nvictory! \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOn the regional contest, surprisingly for the coaches, Team.GOV scored \r\nfive problems in the first four hours and was quite high ranked. After the contest the coaches \r\ndiscovered that the team scored not only the sixth problem but also a \r\nseventh one. The result\u0026nbsp;— 26th place (+35 to the last year\u0027s position) \r\nand a second grade diploma. Team.GOV finally reached success and glory. \r\n\u003ca href\u003d\"https://acm.timus.ru/problem.aspx?space\u003d1\u0026amp;num\u003d1859\"\u003eThe road back home\u003c/a\u003e was ahead.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe spring, Team.GOV traditionally broke up. Vadik wanted to do something \r\nfancy, it was his last contest after all. Vadik \u003ca href\u003d\"https://acm.timus.ru/problem.aspx?space\u003d100\u0026amp;num\u003d7\"\u003einvites\u003c/a\u003e his Chinese girlfriend \r\nXiaohong. The \r\nthird invited teammate unfortunately didn\u0027t come, so on the last minute \r\nVadik took Vitaliy (medal winner of ACM ICPC World Finals) for the Game \r\nTournament before the Ural Championship. Unfortunately, Vitaliy could not participate in the main \r\ncontest, so Vadik took Sasha as an old friend. This was the last contest \r\nof Team.GOV. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe Tradition Keeper scratched his head: in how many Alarm / Team.GOV \r\ncontests has every team member participated? Vadik had always told that \r\nMisha is the member number zero, because he had played in Team.GOV before \r\nthe team got its name. Vadik is indeed player number one. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThere\u0027s a tricky case with Vitaliy: of course he hasn\u0027t taken part in any \r\nTeam.GOV contest, Game Tournament shouldn\u0027t be counted. But he definitely \r\ndeserves to be included in the history of Team.GOV, because he is an award winner \r\nof World Finals and a valuable player in general. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe Tradition Keeper meticulously listed all the members of Team.GOV. \r\n(Misha\u0026nbsp;— 0, Vadik\u0026nbsp;— 1, Alex E.\u0026nbsp;— 2, Sasha\u0026nbsp;— 3, Ivan\u0026nbsp;B.\u0026nbsp;— 4, \r\nNikita\u0026nbsp;— 5, Fedor\u0026nbsp;— 6, Ivan K.\u0026nbsp;— 7, Den\u0026nbsp;— 8, Egor\u0026nbsp;— 9,\r\nXiaohong\u0026nbsp;— 10, Vitaliy\u0026nbsp;— 11). He counted that a number zero has played \r\nfor 5 times (because exactly 5 contests were played by Alarm). And a number \r\none participated in 21 contests. \u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eDid you think that was it? After graduating from Ural Federal University, Vadik has moved to Paris and participated again in an ACM ICPC contest three years after . Vadik and two his teammates (Timothée and Alexandre) got to travel to Valencia to take part in the SWERC regional contest. All they achieved was solving two problems and reaching the 29th place. This makes a sad end of ACM ICPC career of Vadik, this was his final fifth attempt at the regional contests.\r\n\r\n\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eP.S. The numbers of Timothée and Alexandre are 12 and 13 respectively.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe only line contains an integer from 0 to 13\u0026nbsp;— the number of Team.GOV player.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOutput the number of contests that a given member played in the legendary \r\nteam. All contests must be counted but the Game Tournament before the Ural \r\nChampionship. \u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e21\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e11\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}