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