D = int(input()) if D <= 9: print(D) elif D > 9 and D % 2 == 0: print((D + 10) // 20) else: print(((D + 9) // 2) % 10)