#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
using ll = long long int;

int main() {
    int S; cin >> S;

    int ans = 0;
    for(ll i=1; i<=S; i++) {
        for(ll j=1; i*j<=S; j++) {
            ll sum = 0;

            // [i, k], [j, ?]
            for(ll k=i; sum+k*j<=S; sum += k*j, k++) {
                ll nsum = sum + k * j;
                ll base = k*(k+1)/2 - i*(i-1)/2;

                ll ub = S, lb = j-1;
                while(ub - lb > 1) {
                    ll mid = (ub + lb) / 2;
                    ll val = nsum * (mid - j + 1) + base * (mid - j) * (mid - j + 1) / 2;
                    if(val >= S) ub = mid;
                    else lb = mid;
                }

                ll val = nsum * (ub - j + 1) + base * (ub - j) * (ub - j + 1) / 2;
                if(val == S) {
                    ans++;
                }
            }
        }
    }
    cout << ans << endl;
    return 0;
}

