Description
This problem is a programming version of Problem 92 from projecteuler.net
A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before.
will become stuck in an endless loop. What is most amazing is
? As the result can be large, print modulo
Input Format
First and only line contains .
Constraints
Output Format
Print the required answer.
Sample Input
Sample Output




Reviews
There are no reviews yet.