#include<cstdio>
int main() {
  int a;
  scanf("%d",&a);
  a/=10;
  printf("%d",a%10);
}