#include <iostream>
using namespace std;
int main()
{
setlocale(0,"");
int n,m,p;
cout <<"Dati numarul n:";
cin >> n;
p=1;
m=0;
while (n>0)
{
if (n % 2==0){
n=n-1;
}
m=m+(n%10)*p;
n=(n/10);
p=p*10;
}
cout <<"Numarul m:="<< m << endl;
system("pause");
return 0;
}