Problem H
Almost Pythagorean
Languages
en
is
You are given a non-negative integer $n$ and should print the number of integer triples $(a, b, c)$ that satisfy $0 \leq a \leq b \leq c \leq n$ and $a^2 + b^2 = c^2 + c$.
Input
The first and only line of input contains a non-negative integer $n \leq 10^{5}$.
Output
Print the number of integer triples $(a, b, c)$ that satisfy $0 \leq a \leq b \leq c \leq n$ and $a^2 + b^2 = c^2 + c$.
Sample Input 1 | Sample Output 1 |
---|---|
10 |
5 |