n = int(input())
m = n%10
if m != 0:
    print(10 - n%10)
else:
    print(0)