import java.util.Scanner;

public class a3Problem3 {

    public static void main(String[] args) {
    	
    	Scanner in = new Scanner(System.in);
    	
    	int numPeople = 0;
    	
    	while (numPeople <= 100) {
    		System.out.print("Please input the amount of people entering or leaving the restaurant (use negative numbers to represent departures): ");
    		int logEntry = in.nextInt();
    		if (numPeople + logEntry < 0) {
    			System.out.println("There cannot be a negative amount of people in the restaurant.");
    		}
    		else if (numPeople + logEntry == 100) {
    			System.out.println("The restaurant is full.");
    			System.exit(0);
    		}
    		else if (numPeople + logEntry <=100) {
    			numPeople = numPeople + logEntry;
    		}
    		else {
    			System.out.println("There is not enough space for that many people in the restaurant.");
    		}
    		System.out.println("The current amount of people in the restaurant is: " + numPeople);
    		System.out.println();
    	}
    	
    }
    
}