while(0<1){val n=readLine.toInt println("digital_root("+n+")="+(n-(n-1)/9*9))}