Problem:
Score : 300 points

Problem Statement

You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.

How many kinds of items did you get?

Constraints

1 \leq N \leq 2\times 10^5

S_i consists of lowercase English letters and has a length between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

N
S_1
:
S_N

Output

Print the number of kinds of items you got.

Sample Input 1

3
apple
orange
apple

Sample Output 1

2

You got two kinds of items: apple and orange.

Sample Input 2

5
grape
grape
grape
grape
grape

Sample Output 2

1

Sample Input 3

4
aaaa
a
aaa
aa

Sample Output 3

4

Solution in Fortran (GNU Fortran 9.2.1) (judge verdict: Runtime Error)

program main
    implicit none
    integer n
    character(len=10),allocatable, dimension(:) :: s
    integer i,j,k,l,sum,minus,up

    type mytype
        integer :: number
        character(len=10),dimension(100000) :: word
    end type mytype

    type(mytype) :: alpha(26,10)

    read(*,*) n
    allocate(s(n))

    do i = 1,26
        do j = 1,10
            alpha(i,j)%number = 0
        end do
    end do

    do i = 1,n
        read(*,*) s(i)
        if (s(i)(1:1) == "a") then
            k = 1
        else if (s(i)(1:1) == "b") then
            k = 2
        else if (s(i)(1:1) == "c") then
            k = 3
        else if (s(i)(1:1) == "d") then
            k = 4
        else if (s(i)(1:1) == "e") then
            k = 5
        else if (s(i)(1:1) == "f") then
            k = 6
        else if (s(i)(1:1) == "g") then
            k = 7
        else if (s(i)(1:1) == "h") then
            k = 8
        else if (s(i)(1:1) == "i") then
            k = 9
        else if (s(i)(1:1) == "j") then
            k = 10
        else if (s(i)(1:1) == "k") then
            k = 11
        else if (s(i)(1:1) == "l") then
            k = 12
        else if (s(i)(1:1) == "m") then
            k = 13
        else if (s(i)(1:1) == "n") then
            k = 14
        else if (s(i)(1:1) == "o") then
            k = 15
        else if (s(i)(1:1) == "p") then
            k = 16
        else if (s(i)(1:1) == "q") then
            k = 17
        else if (s(i)(1:1) == "r") then
            k = 18
        else if (s(i)(1:1) == "s") then
            k = 19
        else if (s(i)(1:1) == "t") then
            k = 20
        else if (s(i)(1:1) == "u") then
            k = 21
        else if (s(i)(1:1) == "v") then
            k = 22
        else if (s(i)(1:1) == "w") then
            k = 23
        else if (s(i)(1:1) == "x") then
            k = 24
        else if (s(i)(1:1) == "y") then
            k = 25
        else if (s(i)(1:1) == "z") then
            k = 26
        end if
        l = len_trim(s(i))
        alpha(k,l)%number = alpha(k,l)%number + 1
        alpha(k,l)%word(alpha(k,l)%number) = s(i)
    end do

    sum = n

    do i = 1,26
        do j = 1,10

            minus = 0
            up = alpha(i,j)%number
            if (up <= 1) then
                go to 20
            end if
            do k = 1,up
                if (alpha(i,j)%word(k) == "0") then
                    go to 10
                end if
                do l = k + 1, up
                    if(alpha(i,j)%word(k) == alpha(i,j)%word(l)) then
                        minus = minus + 1
                        alpha(i,j)%word(l) = "0"
                    end if
                end do
                10 continue
            end do
            20 continue

            sum = sum - minus

        end do
    end do

    write(*,*) sum


end program