import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int d = sc.nextInt(); if(d<=9){ System.out.println(d); }else if(d>9 && d%2==0){ System.out.println((d+10)/20); }else{ System.out.println(((d+9)/2)%10); } } }