#include<stdio.h> int main() { int n = 0; int c = 0; scanf("%d", &n); c = n % 10; printf("%d", c); return 0; }