import java.util.Scanner;

public class PostponeExample {
    
    public static void main(String[] args) {
        Scanner myScanner = new Scanner(System.in);
        
        //While there's time left the user can postpone the restart
        int timeleft = 0;
       do{
            
            System.out.println("There are " + timeleft + " hours until your computer restarts.");
            
            
			//Get how much the user wants to postpone the time
            int postpone = 0;
            do {
                System.out.println("How many hours would you like to postpone it with?");
                postpone = myScanner.nextInt();
            } while (postpone < 0)
            
            timeleft += postpone;
            
        } while (timeleft-- > 0);
        System.out.println("Your computer will restart now...");   
    }
} 