package main
import (
"fmt"
)
func main() {
var n int
fmt.Scan(&n)
leaves := make(map[string]bool)
var species, color string
for i := 0; i < n; i++ {
fmt.Scan(&species, &color)
leaves[species+" "+color] = true
}
fmt.Println(len(leaves))
}