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