#include <bits/stdc++.h>
using namespace std;
int a[25];
int ans, n;
bool f = true;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int j = 0; j < n; j++) {
    f = true;
    for (int x = j + 1; x >= 0; x--) {
      if (a[j] < a[x]) {
        f = false;
        break;
      }
      if (f == true) ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
