#include <bits/stdc++.h> using namespace std; int main(){string s;cin>>s;for(char&c:s)if(c=='4')c='8';cout<<s<<"\n";}