begin var n:word;repeat read(n);writeln("digital_root(",n,")=",9-(-n)mod 9)until 1=0end.