#include using namespace std; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); uint32_t N; cin >> N; uint32_t ans = 1; while(N % 2 == 0) N /= 2; for(uint32_t i = 3; i <= 447; i += 2){ if(N % i) continue; if(i % 4 == 3){ do N /= i; while(N % i == 0); continue; } uint32_t cnt = 1; do{ N /= i; cnt += 2; }while(N % i == 0); ans *= cnt; } if(N > 1 && N % 4 == 1) ans *= 3; cout << ans - 1 << endl; }