#include <stdio.h>
int main()
{
    float num1 = 0;
    int num2 = 0;
   scanf("%f",&num1 ); 
    num2 = (int)num1;//强制类型转换
    num2 %= 10;
    printf("%d",num2);
    
    return 0;
}