n = int(input()) count = 0 while n > 0: n = n // 2019 count += 1 print(count)