n = int(input()) k = 1 c = -1 for i in [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53]: k *= i c += 1 if n < k: print(c) break