#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int sum(int n){ int x=0; while(n!=0){ x+=n%10; n/=10; } return x; } int main() { int n; rep(i,100) n=sum(n); cout << n << endl; }