main = interact $ show . digital_root . read digital_root = until(<10)$sum.map(read.(:"")).show
495106
7
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!