import utilities.TastaturEingabe;

public class Nullen
{
  public static void main(String args[])
  {
    long n, nullen;
    System.out.print("Bitte geben Sie eine long-Zahl ein: ");
    n = TastaturEingabe.readLong("");
    System.out.print("Die Binaerdarstellung des long-Werts " + n);

    n = ~n;
    
    nullen = 0;
    while(n != 0)
    {
      if((n & 0x1) != 0)
        nullen++;
      n >>>= 1;
    }

    System.out.println(" enthaelt " + nullen + " Null(en).");
  }
}
