#include using namespace std; int main() { // Write C++ code here string x; cin >> x; for(int i=0;i>'4' && x[i]<='9'){ x[i]='9'-x[i]+'0'; } } cout<