#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using P = pair<int, int>;
void Main() {
  int n;
  cin >> n;
  vi a(n + 1);
  for (int(i) = 0; (i) < (n); (i)++) cin >> a[i];
  a[n] = -1;
  int flag_buy = 0;
  int buy, sell;
  int now = 1000;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (!flag_buy && a[i] < a[i + 1]) {
      flag_buy = 1;
      buy = a[i];
      sell = a[i + 1];
    } else if (flag_buy) {
      if (a[i] < a[i + 1]) {
        sell = a[i + 1];
      } else {
        int cnt = now / buy;
        now += cnt * (sell - buy);
        flag_buy = 0;
      }
    }
  }
  cout << now << endl;
  return;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}
