import java.util.*

fun main(args : Array<String>) {
    println(inOutExec(Scanner(System.`in`)))
}

fun inOutExec(scanner: Scanner): String {
    val num = scanner.nextInt()
    val mochies: MutableSet<Int> = hashSetOf()
    repeat(num) {
        mochies.add(scanner.nextInt())
    }

    return mochies.size.toString()
}