#include using namespace std; //型に気を付けよう //a=0x61=97 '0'=0x30=48 #define rep(i,n) for(int i=0;i pairii; typedef vector veci; const double pi=3.1415926535; const ll mod=1000000007; //桁数指定 cout << fixed << setprecision(2) int sum(ll n){ int sum=0; for(int i=9;i>=0;i--){ ll x=n/(pow(10,i)); sum+=x; n-=x*pow(10,i); } return sum; } int main() { ll n; cin>>n; rep(i,100){ n=sum(n); } cout<