#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  long long money = 1000;
  long long st;
  bool pur = false;
  for (long long i = 0; i < n - 1; i++) {
    if (v[i] < v[i + 1]) {
      st = money / v[i];
      money = money % v[i];
      pur = true;
    } else if (v[i] > v[i + 1] && pur) {
      int ind;
      for (long long j = i; j < n - 1; j++) {
        if (v[j] >= v[j + 1]) {
          ind = j;
          break;
        }
      }
      money += v[ind] * 1LL * st;
      i = ind + 1;
      pur = false;
    }
  }
  if (pur) money += st * v[v.size() - 1] * 1LL;
  cout << max(1000 * 1LL, money) << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
