By Valeska Uchôa, UFPI Brazil
Carla owns a vast collection of books containing 100 copies. She spends a lot of time in college so she likes to leave some of them in her closet. However, the closet has room for only 4 books, one compartment for each one.
She is very organized person, therefore she keeps track of every time she wants to read a book. The books stored in her locker are chosen as follows: when Carla wants to read a book that is not in her locker, she brings it the next day and puts it in the place of the least recently read book. Each book has an associated ID that is a number from 1 to 100.
Given a sequence of books read, her algorithm must determine the number of times Carla wanted to read a book that was not in her locker.
The first line is an integer N representing the number of book Carla wants do read. The next N lines are integers L1, L2, ..., LN \((1 \leq L_i \leq 100)\) representing the IDs of the books Carla wanted to read. Input finishes when an EOF is found.
Outputs an integer representing the number of times Carla wanted to read a book that was not in her locker.
|Input Sample||Output Sample|