import java.util.*;
import java.io.*;

class drakes implements Runnable{
    public void run(){
       try{
           Scanner in = new Scanner(new File("drakes.in"));
           PrintWriter out = new PrintWriter(new File("drakes.out"));

           int n = in.nextInt();
           int k = Integer.bitCount(n);
           out.println(k);

           in.close();
           out.close();
       }  catch(Exception e){
               e.printStackTrace();
               System.exit(1);
          }
     }
     public static void main(String[] args) {
       new Thread(new drakes()).start();
    }
}
