#include <stdio.h>

int main(){
	char c;
	int e;
	scanf ("%c",&c);
	printf ("%d", ( c - '0') );
}
