#include <bits/stdc++.h>
using namespace std;
uint64_t MOD = 1000000007;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int n = 0; n < N; n++) cin >> A.at(n);
  vector<char> ope;
  vector<int> price;
  int s = 0, e = 0;
  for (int n = 1; n < N; n++) {
    if (A.at(n) < A.at(n - 1)) {
      if (n - 1 == s)
        s = n;
      else {
        e = n - 1;
        ope.push_back('b');
        price.push_back(A.at(s));
        ope.push_back('s');
        price.push_back(A.at(e));
        s = n;
      }
    } else if (n == N - 1 && A.at(n) > A.at(s)) {
      e = n;
      ope.push_back('b');
      price.push_back(A.at(s));
      ope.push_back('s');
      price.push_back(A.at(e));
      s = n;
    }
  }
  int64_t ans = 1000;
  int kabu = 0;
  for (int i = 0; i < ope.size(); i++) {
    char o = ope.at(i);
    if (o == 's') {
      ans += kabu * price.at(i);
      kabu = 0;
    } else if (o == 'b') {
      kabu += ans / price.at(i);
      ans -= ans / price.at(i) * price.at(i);
    }
  }
  cout << ans << endl;
}
