{"raw_statement":[{"iden":"statement","content":"Apart from having lots of holidays throughout the year, residents of Berland also have whole _lucky_ years. Year is considered _lucky_ if it has no more than _1_ non-zero digit in its number. So years 100, 40000, 5 are _lucky_ and 12, 3001 and 12345 are not.\n\nYou are given current year in Berland. Your task is to find how long will residents of Berland wait till the next _lucky_ year."},{"iden":"input","content":"The first line contains integer number _n_ (1 ≤ _n_ ≤ 109) — current year in Berland."},{"iden":"output","content":"Output amount of years from the current year to the next _lucky_ one."},{"iden":"examples","content":"Input\n\n4\n\nOutput\n\n1\n\nInput\n\n201\n\nOutput\n\n99\n\nInput\n\n4000\n\nOutput\n\n1000"},{"iden":"note","content":"In the first example next _lucky_ year is 5. In the second one — 300. In the third — 5000."}],"translated_statement":[{"iden":"statement","content":"除了全年有许多假期外，Berland 的居民还拥有整年的 _幸运年_。如果一个年份的数字中至多包含 _1_ 个非零数字，则该年份被视为 _幸运年_。因此，年份 100、40000、5 是 _幸运年_，而 12、3001 和 12345 则不是。\n\n给你 Berland 的当前年份。你的任务是找出居民们需要等待多少年才能迎来下一个 _幸运年_。\n\n第一行包含整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 109]) —— Berland 的当前年份。\n\n请输出从当前年份到下一个 _幸运年_ 所需的年数。\n\n在第一个例子中，下一个 _幸运年_ 是 5。在第二个例子中是 300。在第三个例子中是 5000。\n\n"},{"iden":"input","content":"第一行包含整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 109]) —— Berland 的当前年份。"},{"iden":"output","content":"请输出从当前年份到下一个 _幸运年_ 所需的年数。"},{"iden":"examples","content":"输入\n4\n输出\n1\n输入\n201\n输出\n99\n输入\n4000\n输出\n1000"},{"iden":"note","content":"在第一个例子中，下一个 _幸运年_ 是 5。在第二个例子中是 300。在第三个例子中是 5000。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $, $ 1 \\leq n \\leq 10^9 $, denote the current year.  \nA year $ y \\in \\mathbb{Z}^+ $ is *lucky* if its decimal representation contains at most one non-zero digit, i.e., $ y = d \\cdot 10^k $ for some $ d \\in \\{1, 2, \\dots, 9\\} $ and $ k \\in \\mathbb{Z}_{\\geq 0} $.\n\n**Constraints**  \n$ 1 \\leq n \\leq 10^9 $\n\n**Objective**  \nFind the smallest lucky year $ y $ such that $ y > n $, and compute $ y - n $.","simple_statement":null,"has_page_source":false}