#include <bits/stdc++.h>
using namespace std;
map<int, int> M;
vector<int> V[200005];
int A[200005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, ans, ns, ne;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> A[i];
  ans = 1000;
  ns = ans / A[1];
  ne = ans % A[1];
  for (int i = 2; i <= n; i++) {
    if (A[i] > A[i - 1]) {
      ans = max(ans, ns * A[i] + ne);
      ns = ans / A[i];
      ne = ans % A[i];
    } else {
      ns = ans / A[i];
      ne = ans % A[i];
    }
  }
  cout << ans;
  return 0;
}
