import std.algorithm, std.array, std.container, std.range, std.bitmanip;
import std.numeric, std.math, std.bigint, std.random;
import std.string, std.conv, std.stdio, std.typecons;

void main()
{
  auto n = readln.chomp.to!int;
  auto ai = readln.split.map!(to!int).array;

  ai.sort();
  writeln(ai.group.count!("a[1] == 1"));
}