#include //const static double de_PI = 3.14159265358979323846; //const static int de_MOD = 1000000007; //const static int de_MAX = 999999999; //const static int de_MIN = -999999999; int main(void) { //std::ifstream in("123.txt"); std::cin.rdbuf(in.rdbuf()); int N = 0; std::cin >> N; std::vector A(N); for (int i = 0; i < N; i++) { std::cin >> A[i]; } int ans = 0; for (int i = 1; i < N; i++) { if (A[i] < A[0]) { ans++; } } std::cout << ans << std::endl; }