eolymp
bolt
Try our new interface for solving problems
Problems

Radio 106 FM

Radio 106 FM

You are given a list of songs that have been played on 106 FM so far. There are n songs in total in the list. Find the length of the longest fragment of songs that consists of non-repeating songs.

Input

The first line contains the number of songs n (1n105). The second line contains n numbers k1, k2, ..., kn (1ki109) - identification numbers of the songs.

Output

Print the length of the longest non-repeating fragment of the song.

Time limit 1 second
Memory limit 128 MiB
Input example #1
8
1 2 1 3 2 7 4 2
Output example #1
5
Input example #2
4
1 1 2 1
Output example #2
2
Source 2022 Azerbaijan Round 1, 8-9 classes