@Override
    public Integer solve() {

        final int max = 50000000;
        final long[] a = new long[max + 1];
        
        
        for (int n = 2; n <= max; ++n) a[n] = 2L * n * n - 1;
        
        int count = 0;
        
        for (int n = 2; n <= max; ++n) {
            
            final long t = a[n];
            
            if (t == 1) continue;
            if (t == 2L * n * n - 1) ++count;
            
            for (long i = t - n; i <= max; i += t) {
                while (a[(int)i] % t == 0) a[(int)i] /= t;
            }
            for (long i = t + n; i <= max; i += t) {
                while (a[(int)i] % t == 0) a[(int)i] /= t;
            }
        }

        return count;
    }