This problem is a programming version of Problem 80 from projecteuler.net
It is well known that if the square root of a natural number is not an integer, then it is irrational. The decimal expansion of such square roots is infinite without any repeating pattern at all.
The square root of two is , and the digital sum of the first one hundred decimal digits is .
For the first natural numbers, find the total of the digital sums of the first digits for all the irrational square roots x such that .
First line contains and second line contains
Print the required digit sum as asked.