#include #include int main() { typedef std::uint32_t uInt; uInt n; uInt count=0; uInt back = 0; std::cin >> n; for (uInt i = 0; i < n; i++) { uInt value; std::cin >> value; if (back >= value) { count++; } back = value; } std::cout << count << std::endl; return 0; }