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