#include
using namespace std;
int rem=0,sum=0;
int replace(int n){
while(n!=0){
rem=n%10;
n=n/10;
if(rem==0){
sum=sum*10+5;
}
else{
sum=sum*10+rem;
}
}
return sum;
}
int invertback(int n){
while(n!=0){
int k=sum%10;
sum=sum/10;
sum=sum*10+k;
}
cout<<sum;
return sum;
}
int main(){
int n;
cin>>n;
replace(n);
cout<<invertback(n);
}
https://online.codingblocks.com/app/player/246132/content/235737/4714/code-challenge