#include <stdio.h> int main() { int a, b; scanf("%d",&a); b=a%10;//直接除余就好啦 printf("%d\n",b); return 0; }