#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, x = 1000, kabu = 0;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int cnt = 0;
  while (1) {
    if (cnt == n - 1) {
      x += kabu * a[n - 1];
      break;
    }
    if (a[cnt] <= a[cnt + 1]) {
      int cnt1 = cnt + 1;
      kabu += x / a[cnt];
      x -= a[cnt] * (x / a[cnt]);
      while (1) {
        if (a[cnt1] > a[cnt1 + 1] || cnt1 == n - 1) {
          x += kabu * a[cnt1];
          kabu = 0;
          cnt = cnt1;
          break;
        } else {
          ++cnt1;
        }
      }
    } else {
      ++cnt;
    }
  }
  cout << x << "\n";
  return 0;
}
