#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int rek(int broj) {
    int broj_na_cifri = 0;
    while(broj > 0) {
        broj_na_cifri += 1;
        broj /= 10;
    }
    if(broj_na_cifri % 2 == 0) {
        return 1;
    }
    else {
        return 0;
    }
}
int main(int argc, const char * argv[]) {
    int n;
    scanf("%d", &n);
    
    printf("%d\n", rek(n));
    return 0;
}
