#include int main(void) { int d; scanf("%d", &d); printf("%d\n", d < 10 ? d : d % 2 == 0 ? (d + 10) / 20 : (d - 10) / 2 % 10); return 0; }