void main() {
    import std.stdio, std.string, std.conv, std.algorithm, std.range, std.array;
    auto N = readln.chomp.to!int;
    N.iota.map!(_ => readln.chomp.to!int).array.sort.uniq.walkLength.writeln;
}
