#include <iostream>
using namespace std;
/*
Pasii de implementare:
Declaram si citim “n”.
Declaram variabila “newNumber” pe care o initializam cu “0”.
Ne folosim de o structura repetitiva care parcurge cifrele lui “n”:
Ne folosim de o structura decizionala unde verificam ca numărul să fie impar:
i. Adaugam la “newNumber” ultima cifra a lui “n” urmata de cifra “1”.
Altfel:
i. Adaugam la “newNumber” ultima cifra a lui “n” urmata de cifra “0”.
La final afisam ““newNumber”.
*/
const int TEN = 10;
const int HUNDRED = 100;
int main() {
int n;
cin >> n;
int newNumber = 0;
while (n != 0) {
if (n % 2 != 0) {
newNumber = newNumber * HUNDRED + n % TEN * TEN + 1;
} else {
newNumber = newNumber * HUNDRED + n % TEN * TEN + 0;
}
n /= TEN;
}
cout << newNumber;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwovKgpQYXNpaSBkZSBpbXBsZW1lbnRhcmU6CkRlY2xhcmFtIHNpIGNpdGltIOKAnG7igJ0uCkRlY2xhcmFtIHZhcmlhYmlsYSDigJxuZXdOdW1iZXLigJ0gcGUgY2FyZSBvIGluaXRpYWxpemFtIGN1IOKAnDDigJ0uCk5lIGZvbG9zaW0gZGUgbyBzdHJ1Y3R1cmEgcmVwZXRpdGl2YSBjYXJlIHBhcmN1cmdlIGNpZnJlbGUgbHVpIOKAnG7igJ06CglOZSBmb2xvc2ltIGRlIG8gc3RydWN0dXJhIGRlY2l6aW9uYWxhIHVuZGUgdmVyaWZpY2FtIGNhIG51bcSDcnVsIHPEgyBmaWUgaW1wYXI6CgkJaS4gQWRhdWdhbSBsYSDigJxuZXdOdW1iZXLigJ0gdWx0aW1hIGNpZnJhIGEgbHVpIOKAnG7igJ0gdXJtYXRhIGRlIGNpZnJhIOKAnDHigJ0uCglBbHRmZWw6CgkJaS4gQWRhdWdhbSBsYSDigJxuZXdOdW1iZXLigJ0gdWx0aW1hIGNpZnJhIGEgbHVpIOKAnG7igJ0gdXJtYXRhIGRlIGNpZ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