Problems
Binomial coefficients 3
Binomial coefficients 3
You are given a positive integer \textbf{x}. Find the smallest positive integer \textbf{n} for which there exists \textbf{k} such that \textbf{C}(\textbf{n}, \textbf{k}) = \textbf{x}.
\InputFile
The first line contains the positive integer \textbf{x} ≤ \textbf{10^100}.
\OutputFile
Print the required integer \textbf{n} without leading zeros.
Input example #1
6
Output example #1
4