#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int N;
  cin >> N;
  ll A[N];
  ll kane = 1000;
  ll kabu = 0;
  ll remain = 0;
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
    ll tmp_kane = kane;
    if (kane < kabu * A[i] + remain) {
      tmp_kane = kabu * A[i] + remain;
    }
    if (remain / A[i] > 0) {
      kabu += remain / A[i];
      remain = remain % A[i];
    }
    if (kabu < kane / A[i]) {
      kabu = kane / A[i];
      remain = kane % A[i];
    }
    kane = tmp_kane;
  }
  cout << kane << endl;
  return 0;
}
