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