/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication6;

import java.util.Scanner;

/**
 *
 * @author joelx
 */
public class JavaApplication6 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("entrez le nombre que vous souhaitez voir apparaitre");
        int n,x,pos=0;
        n = scan.nextInt();
        System.out.println("entrez une suite de nombre");
        x = scan.nextInt();
        
        
        while(x!=-1){
            if(x==n)
                ++pos;
            
            x = scan.nextInt();
        }
        System.out.println(+n +" apparait " +pos +" fois");
                
        // TODO code application logic here
    }
    
}
