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.
The first line contains the number of songs n (1 ≤ n ≤ 10^5
). The second line contains n numbers k[1]
, k[2]
, ..., k[n]
(1 ≤ k[i]
≤ 10^9
) - identification numbers of the songs.
Print the length of the longest non-repeating fragment of the song.