import math n=int(input()) count=math.floor(math.log10(n)) print(abs(count-10))