AT_past202309_c コンテスト

Description

You are going to hold a competitive programming contest several times. Holding a contest requires preparing a total of eight problems: one problem of each **difficulty** from $ 1 $ through $ 8 $ . You have prepared $ N $ problems, the $ i $ -th of which is of difficulty $ A_i $ . If you cannot use the same problem for multiple contests, at most how many contests can you hold with the $ N $ problems prepared?

Input Format

The input is given from Standard Input in the following format: > $ N $ $ A_1 $ $ \ldots $ $ A_N $

Output Format

Print the answer.

Explanation/Hint

### Sample Explanation 1 For example, you can hold one contest with the $ 1 $ -st, $ 2 $ -nd, $ 3 $ -rd, $ 4 $ -th, $ 5 $ -th, $ 7 $ -th, $ 8 $ -th, and $ 9 $ -th problems. ### Constraints - $ 1 \leq N \leq 5 \times 10^5 $ - $ 1 \leq A_i \leq 8 $ - All input values are integers.