#include int main(){ int n, a, b,c,d; scanf("%d",&n); if(n<10){printf("%d",n);} else{ a = n / 10; b = n % 10; c = b % 2; d = a % 2; if(c==0){ printf("%d",(a+1)/2);} else{ if(d==0){ if(b==1){printf("5");} else if(b==3){printf("6");} else if(b==5){printf("7");} else if(b==7){printf("8");} else {printf("9");} } else{printf("%d",b/2);} } } }