1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>

using namespace std;

int main()
{
    uint32_t n;
    cin >> n;

    uint32_t m = 0;

    uint32_t l1 = 2;
    uint32_t l2 = 2;

    while ( ( 1 + l1 + l1 * l2 ) <= n )
    {
        while ( ( 1 + l1 + l1 * l2 ) <= n )
        {
            if ( n % ( 1 + l1 + l1 * l2 ) == 0 || n % ( 1 + l2 + l1 * l2 ) == 0 )
            {
                m++;
            }

            l2++;
        }

        l1++;
        l2 = l1 + 1;
    }

    cout << m;

    return 0;
}