#include <stdio.h> int main() { int arr[10] = { 0 }; int count = 0; int n = 0; int m = 0; int result = 0; scanf("%d", &n); while (n != 0) { m = n % 10; if (m % 2 == 0) arr[count++] = 0; else arr[count++] = 1; n = n / 10; } for (int i = count - 1; i >= 0; i--) { result = result * 10 + arr[i]; } printf("%d", result); return 0; }