N = int(input()) list1 = list(N) n = 0 def main(lists): for i in lists: n = n + 1 lists = list(n) if len(lists) == 1: break print(main(list1))