import java.io.InputStream
import java.io.PrintStream
import java.util.*

class Abc085B(
    val input: InputStream,
    val output: PrintStream
) {
    fun proc() {
        val sc = Scanner(input)
        val n = sc.nextInt()
        val input = generateSequence { sc.nextInt() }
            .take(n).toList().distinct()
        output.print(input.size)
    }
}

fun main(args: Array<String>) {
    Abc085B(System.`in`, System.out).proc()
}
