eolymp
bolt
Try our new interface for solving problems
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.
Time limit 1 second
Memory limit 128 MiB
Input example #1
6
Output example #1
4
Author Anton Lunyov