/*
TASK:sum
LANG:C++
*/
#include <iostream>
#include <math.h>
using namespace std;

long long n,k,i,t,br=0,temp;
int main()
{   
    cin>>n;
    k=2*n;
    t=sqrt(k)+1;
    for (i=1;i<t;i++)
     if (k%(i+1)==0){temp=k/(i+1);
                     temp-=i;
                     temp/=2;
                     if (temp!=0)br++;
                   //  cout<<temp<<" "<<temp+i<<endl;               
                     }
    cout<<br<<endl;
//    system("pause");
    return 0;
}
