def solve(): org = len('1000000007') inp = len(input()) ans = 0 if (org > inp): ans = org - inp elif (org < inp): ans = inp - org print(ans) solve()