/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{

        Map<Integer,Integer> st = new HashMap<Integer,Integer>();		
		Scanner s = new Scanner(System.in);
		
		// compiles with no issues:
		int i = 0;
		int key;
		while ((s.hasNextInt()) && (key = s.nextInt()) >= 0){
		    st.put(key, i);
		    i++;
		}
		
		// this, using key after the loop, would generate an uninitialized error:
		//System.out.println(key);

	}
}