#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<pair<long long, long long> > mx(n);
  for (int i = 0; i < n; i++) {
    long long mx1 = a[i];
    int j = i;
    for (j = i + 1; j < n; j++) {
      if (a[j] >= a[j - 1]) {
        mx1 = max(mx1, a[j]);
      } else {
        break;
      }
    }
    mx[i].first = mx1;
    mx[i].second = j;
  }
  long long cur = 1000;
  for (int i = 0; i < n;) {
    if (mx[i].second != i + 1) {
      int no = cur / a[i];
      cur += (mx[i].first - a[i]) * 1LL * no;
      i = mx[i].second;
    } else {
      i++;
    }
  }
  cout << cur << endl;
}
