This problem is a programming version of Problem 91 from projecteuler.net
The points and are plotted at integer co-ordinates and are joined to the origin, , to form .
There are exactly fourteen triangles containing a right angle that can be formed when each co-ordinate lies between and inclusive; that is, .
Given that , how many right triangles can be formed?
First and only line contains .
Output the required count.