#C1189. Parking Slot Allocation

    ID: 41255 Type: Default 1000ms 256MiB

Parking Slot Allocation

Parking Slot Allocation

You are organizing a parking lot for an event. Given the number of cars arriving and the list of existing parking slots (each represented by a dummy integer), determine how many additional parking slots are required if the current slots are insufficient.

Mathematically, if \( n \) is the number of cars and \( m \) is the number of existing parking slots, then the answer is given by:

\( \text{additional} = \max(0, n - m) \)

Your task is to read the input from standard input (stdin) and print the result to standard output (stdout).

inputFormat

The input consists of two lines:

  • The first line contains a non-negative integer \( n \), the number of cars.
  • The second line contains zero or more space-separated integers representing the existing parking slots. The actual numbers are not important; only the count matters. This line may be empty if there are no parking slots.

outputFormat

Output a single integer to standard output (stdout), representing the number of additional parking slots needed. If the available slots are enough, output 0.

## sample
5
1 1 1 1 1
0