Tteokguk
Time limit1sMemory limit1024 MB
Given bowl sizes, stack each bowl only on a strictly smaller one and find the minimum number of towers needed to use all bowls.
Problem

Do you know Naver D2? D2 stands for For Developers, By Developers, a Naver developer support program that developers build themselves for developers. It shares the technology and knowledge Naver has accumulated, supports outside developers to strengthen Korean developers' capabilities, and through this aims to create a virtuous cycle in which the whole industry and Naver grow together.
Naver's developer support has in fact continued steadily for a long time. There have been many support programs, including the developer conference DEVIEW, releases of open source and development tools, and support for academic societies and communities. Naver D2 is what integrated these various programs into one.
NAVER D2, a developer support program that grows together, holds the developer conference DEVIEW every year.
In 2021 the preparation of talks for DEVIEW, to present a variety of topics, is in full swing. But a very big problem has come up. So many empty tteokguk bowls left over from meals have piled up on the desk that the work cannot proceed. You happened to be passing by and decided to help!
On top of a tteokguk bowl you can stack one tteokguk bowl of a smaller size. On top of the stacked tteokguk bowl you can stack another tteokguk bowl in the same way. For example, for tteokguk bowls of sizes , , , , you can stack them in the order , but you cannot stack them in the order . One or more tteokguk bowls stacked this way are called a tteokguk bowl tower.
You want to make the number of tteokguk bowl towers as small as possible to free up space on the desk.
The following are examples of the number of tteokguk bowl towers you can make from tteokguk bowls of sizes , , , , , and the minimum number is .
- :
- : or or or
- : or or or
- : or or or
- It cannot be made into tteokguk bowl tower.
Given the sizes of the tteokguk bowls, find the minimum number of tteokguk bowl towers. As a token of thanks, NAVER D2 will accept one problem of SUAPC 2021w as correct for you.
Input
The input is given as follows.
Output
Print the minimum number of tteokguk bowl towers.
Constraints
- is the number of tteokguk bowls. ()
- is the size of the -th tteokguk bowl. ()
- All numbers in the input are integers.