#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  int s = 1000;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int f = 1, k = -1;
  for (int i = 1; i < n; i++) {
    if (a[i - 1] < a[i]) {
      k = i;
      break;
    }
  }
  if (k == -1) {
    cout << 1000 << endl;
    return 0;
  }
  int l = a[0];
  for (int i = k + 1; i < n; i++) {
    if (f == 1) {
      if (a[i] < a[i - 1]) {
        int p = s / l;
        s = s - p * l + p * a[i - 1];
        f = -1;
        l = a[i];
      }
    }
    if (f == -1) {
      if (a[i] <= a[i - 1]) {
        l = a[i];
      } else {
        f = 1;
      }
    }
  }
  if (f == 1) {
    int p = s / l;
    s = s - p * l + p * a[n - 1];
  }
  cout << s << endl;
  return 0;
}
