#include<bits/stdc++.h> using namespace std; int x,a,b,c,d; int main(){ cin>>x; a=x/1000; x%=1000; b=x/100; x%=100; c=x/10; x%=10; d=x; a+=5; a%=10; b+=5; b%=10; c+=5; c%=10; d+=5; d%=10; cout<<d*1000+c*100+b*10+a; return 0; } /************************************************************** Problem: 1109 User: zhangziang Language: C++ Result: Accepted Time:9 ms Memory:2072 kb ****************************************************************/