#include
using namespace std;
void cb(int n){
int r,num=0,p=1,f;
while(n>0){
r=n%10;
n=n/10;
f=9-r;
if(f<r){
num=num+fp;
}
else{
num=num+rp;
}
p*=10;
}
cout<<num;
}
int main() {
int n;cin>>n;
cb(n);
return 0;
}
this code is compiled successfully but not submitting