#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  vector<int> ans(n);
  int l = -1, lp = 300, r = -1, rp = -1;
  for (int i = 0; i < n; i++) {
    if (r < 0) {
      if (a.at(i) <= lp)
        lp = a.at(i), l = i;
      else
        rp = a.at(i), r = i;
    } else {
      if (a.at(i) >= rp)
        rp = a.at(i), r = i;
      else {
        ans.at(l) = 1, ans.at(r) = 2;
        l = -1, lp = 300, r = -1, rp = -1;
      }
    }
    if (i == n - 1 && r > 0) ans.at(l) = 1, ans.at(r) = 2;
  }
  long long res = 1000, cnt = 0;
  for (int i = 0; i < n; i++) {
    int now = ans.at(i);
    if (now == 1) {
      cnt = res / a.at(i);
      res %= a.at(i);
    }
    if (now == 2) {
      res += cnt * a.at(i);
      cnt = 0;
    }
  }
  cout << res << endl;
}
