# coding utf-8 n = int(input()) # 1 ~ 9 -> 1<=n<=9 # 10 ~ 99 -> 10=n<=10+90*2 # 100 ~ 999 -> 10+90*2<=n<=10+90*2+900*3 if n/10 == 0: print(n) else: amari = n % 10 sho = int(n/10) if amari%2 != 0: print(int(amari/2)+int(sho%2*5)) else: print(int(sho/2)+1)