#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<pair<int, int>> p;
  int u, d;
  d = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      u = i;
      p.push_back(make_pair(d, u));
      int next = i + 1;
      int mi = a[i + 1];
      for (int j = i + 1; j < n - 1; j++) {
        if (a[j] < a[j + 1]) {
          i = j;
          break;
        }
        if (mi > a[j + 1]) {
          mi = a[j + 1];
          next = j + 1;
          i = j + 1;
        }
      }
      d = next;
    }
  }
  p.push_back(make_pair(d, n - 1));
  ll sum = 1000;
  for (int i = 0; i < p.size(); i++) {
    int buy = sum / a[p[i].first];
    sum -= buy * a[p[i].first];
    sum += buy * a[p[i].second];
  }
  cout << sum << endl;
}
