#include #include void solve() { int l; std::cin >> l; int ans = 0; for (int m = 1; m * m <= l; ++m) { for (int n = 1; n < m; ++n) { int a = m * m - n * n, b = m * n * 2; if (std::gcd(a, b) != 1) continue; int sum = m * 2 * (m + n); if (sum * 4 <= l) ++ans; } } std::cout << ans << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }