#CCBCHBAHAI0000110. Booking a Room
Booking a Room
Booking a Room
Source: Kattis
Version: Phuoc Hung OJ Extended
Problem
Rooms are numbered and distinct rooms are already booked. If a room is free, this PHOJ version requires the smallest free room . If all rooms are booked, print too late.
Input
The first line contains . If , the next line contains distinct booked room numbers.
Output
Print the smallest free room, or too late if none exists.
Subtask
Subtask 1 (20 points): .
Subtask 2 (30 points): .
Subtask 3 (50 points): , .
Example
Input
5 4
1 2 4 5
Output
3
Explanation
Only room 3 is free.