#include #include using namespace std; int main() { int t; cin >> t; string s, tmp; for (int i=0; i> s; while (s.size()>1) { for (int j=1; j=10) t=1+(t%10); tmp+=(t+'0'); } s=tmp; tmp=""; } cout << s << endl; } }