Internet Cafe Seat Requests

Interview

Time limit2sMemory limit128 MB

Summary
Given a sequence of seat requests for 100 computers, count how many requests are rejected because the requested seat is already taken.
Level

Easy2 of 10

Topics
Simulation, Array, Implementation
Solved
No attempts yet

Problem

Sejun works part-time at an internet cafe. The cafe has computers numbered from 1 to 100.

Each arriving customer states the number of the computer they want to use. If that seat is empty, the customer sits there and uses the computer. If someone is already sitting there, the customer is rejected.

Initially, every seat is empty, and a seated customer never leaves. Given the customers' requested seats in arrival order, determine how many customers are rejected.

Input

The first line contains the number of customers, N. N is at most 100.

The second line contains the seat number requested by each customer, in arrival order.

Output

Print the number of rejected customers on the first line.

Examples1

  1. Example 1

    Input
    3
    1 2 3
    
    Expected output
    0