LearnPy Hub
← Arena
IntermediateRating 1200

Pythagorean Triples

Count triples a < b < c ≤ n with a² + b² = c².

Input

One integer n (n ≤ 2000).

Output

One integer.

Sample 1

Input
5
Output
1

Sample 2

Input
4
Output
0
solution.py
Output appears here
Pythagorean Triples · Python Arena problem · LearnPy Hub