k = int(input()) lst = [1] for i in range(0, len(lst)): n = int(len(lst)) if sum(lst) <= k: lst = lst.append(1.0 / (n + 1.0)) else: print(n)