import math N = int(input()) - 7 b = 1000000000 if N > b: N, b = b, N print(int(math.log10(b // N)))