#include <bits/stdc++.h> using namespace std; int s[30000], aj = 10000, k = 1, j = 1; int main() { while (cin >> s[j]) j++; for (int u = 1; u < j; u++) { if (aj >= s[u]) { aj = s[u]; } else { k++; aj = s[u]; } } cout << k; }