#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    ll s, ans = 0;
    cin >> s;
    s *= 4;  // s = (a+b)(b-a+1)(c+d)(d-c+1)/4
    // 約数列挙
    vector<int> divisor;
    for(int i=1;i*i<=s;i++){
        if(s%i==0){
            divisor.push_back(i);
            if(s/i != i) divisor.push_back(s/i);
        }
    }
    sort(divisor.begin(), divisor.end());
    for(auto x : divisor){
        for(auto y : divisor){
            if(s%(x*y)!=0 || (x+y)%2==0) continue;
            if(x<y) break;
            for(auto z : divisor){
                if(s%(x*y*z)!=0) continue;
                ll w = s/(x*y*z);
                if((z+w)%2==0)continue;
                if(z<w)continue;
                ans++;
            }
        }
    }
    cout << ans << endl;

    return 0;
}

