import java.util.*;
public class ScannerTest1 {
   public static void main (String [] args) {
   
      Scanner sc = new Scanner(System.in);
      
      System.out.print("Give me an integer ");
            
      if (sc.hasNextInt()) {
         int iAnswer = sc.nextInt();
         System.out.println("We got " + iAnswer);     
      }
      else if (sc.hasNext()) {
         System.out.println(sc.next() + " is not what we asked for");
      }
      else {
         System.out.println("you are not cooperating");
      }
      
   }
}