#include<iostream>
using namespace std;
int n,nr;
int main()
{
cin>>n;
while(n)
{
if(n%2==0)nr++;
n/=2;
}
cout<<nr;
return 0;
}