#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int cash = 1000;
  int stock = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > a[i + 1]) {
      if (stock > 0) {
        cash += stock * a[i];
        stock = 0;
      }
      continue;
    }
    if (stock == 0) {
      stock = cash / a[i];
      cash -= stock * a[i];
    }
  }
  cout << cash << endl;
}
