Class Main
    Public Shared Sub Main()
        Dim N As long = Console.ReadLine
    dim i1 as long
    dim i2 as long = 0
    dim i3 as long = 0
    dim str(N) as string
    for i1 = 0 to N - 1
    	str(i1) = ""
    	dim strR as string = Console.ReadLine
    	for i2 = 0 to i1
    		if str(i2) = "" then
      			str(i2) = strR
      i3 = i2
      			exit for
 	   		end if
    		if str(i2) = strR then
      			exit for
 	   		end if
    	next i2
  	next i1
Console.WriteLine(i3 + 1)
        End Sub
End Class
