{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\u0027text/css\u0027\u003e .input, .output {border: 1px solid #888888;} .output {margin-bottom:1em;position:relative;top:-1px;} .output pre,.input pre {background-color:#EFEFEF;line-height:1.25em;margin:0;padding:0.25em;} .title {background-color:#FFFFFF;border-bottom: 1px solid #888888;font-family:arial;font-weight:bold;padding:0.25em;} \u003c/style\u003e \u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027]]}\n });\n \u003c/script\u003e\n \u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n \u003c/script\u003e\n\u003cp\u003eAfter passing a coding test, Piyush got himself a crate of n candies. He decided to eat an equal amount of candies each morning until there are no more candies. However, Ankit also noticed the crate and decided to get some candies for himself.\u003c/p\u003e\n\u003cp\u003eThis means the process of eating candies is the following: in the beginning Piyush chooses a single integer k, same for all days. After that, in the morning he eats k candies from the crate (if there are less than k candies in the crate, he eats them all), then in the evening Ankit eats 10% of the candies \u003cspan class\u003d\"tex-font-style-bf\"\u003eremaining\u003c/span\u003e in the crate. If there are still candies left in the crate, the process repeats\u0026nbsp;— next day Piyush eats k candies again, and Ankit\u0026nbsp;— 10% of the candies left in a crate, and so on.\u003c/p\u003e\n\u003cp\u003eIf the amount of candies in the crate is not divisible by 10 Ankit rounds the amount he takes from the crate down. For example, if there were 97 candies in the crate, Ankit would eat only 9 of them. In particular, if there are less than 10 candies in a crate, Ankit won\u0027t eat any at all.\u003c/p\u003e\n\u003cp\u003eYour task is to find out the minimal amount of k that can be chosen by Piyush so that he would eat at least half of the n candies he initially got. Note that the number k must be integer.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains a single integer n (1 \u003c\u003dn \u003c\u003d 10^{18})\u0026nbsp;— the initial amount of candies in the crate.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOutput a single integer\u0026nbsp;— the minimal amount of k that would allow Piyush to eat at least half of candies he got.\u003c/p\u003e"}},{"title":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e68\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e3\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the Sample, the amount of candies with\u003cb\u003e k\u003d3 \u003c/b\u003ewould change in following way\u003c/p\u003e \n\u003cp\u003e\u003cb\u003e68 \u003d\u003e 65 \u003d\u003e 59 \u003d\u003e 56 \u003d\u003e 51 \u003d\u003e 48 \u003d\u003e 44 \u003d\u003e 41\u003cbr\u003e\n\u003d\u003e 37 \u003d\u003e 34 \u003d\u003e 31 \u003d\u003e 28 \u003d\u003e 26 \u003d\u003e 23 \u003d\u003e 21 \u003d\u003e 18 \u003d\u003e 17 \u003d\u003e 14\u003cbr\u003e\n\u003d\u003e 13 \u003d\u003e 10 \u003d\u003e 9 \u003d\u003e 6 \u003d\u003e 6 \u003d\u003e 3 \u003d\u003e 3 \u003d\u003e 0\u003c/b\u003e\u003c/p\u003e \n\u003cp\u003eIn total, Piyush would eat \u003cb\u003e39\u003c/b\u003e while Ankit \u003cb\u003e29\u003c/b\u003e\u003c/p\u003e"}}]}