using System; using System.Linq; using System.Collections.Generic; static class NagataKanaIsAGenius { public static void Main() { int n=int.Parse(Console.ReadLine()); if(n<10){ Console.WriteLine(n); }else{ int x=n/2+5; Console.WriteLine(n%2==0?x/10:x%10); } } }