#include<stdio.h> int main() { int a[9] = { 0 }, b,i,c=1,w=0,count=0; scanf("%d", &b); for (i = 0; i < 9; i++) { count++; a[i] = b / c % 10; c *= 10; if (a[i] % 2 == 0) a[i] = 0; else a[i] = 1; if (b / c == 0) break; } for (i = count - 1; i >= 0; i--) {

    if (a[i] == 1) {
        for (int j = i; j >= 0; j--) printf("%d", a[j]);
        return 0;
    }
}
printf("0");
return 0;

}