#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> j(n);
  bool flag = true;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] <= a[i + 1]) {
      j[i + 1] = 1;
      flag = false;
    }
  }
  if (flag) {
    cout << "1000" << endl;
    return 0;
  }
  long long ans = 1000;
  long long k = 0;
  for (int i = 0; i < n; i++) {
    if (j[i] == 0) {
      k += ans / a[i];
      ans = ans - (ans / a[i]) * a[i];
    } else if (j[i + 1] == 0) {
      ans += a[i] * k;
      k = 0;
    }
  }
  cout << ans << endl;
}
