SP19913 PYTRIP3 - Counting Pythagorean Triples

Description

We define a Pythagorean triple as a set of three positive integers $ a $ , $ b $ and $ c $ which satisfy $ a^2 + b^2 = c^2 $ . Let $ P(N) $ denote the number of Pythagorean triples whose hypotenuses ( $ = c $ ) are less than or equal to $ N $ (i.e. $ c \le N $ ). Given $ N $ , find $ P(N) $ .

Input Format

The first line of input contains a positive integer $ N $ .

Output Format

Print on a single line the value of $ P(N) $ .