#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < N; i++) cin >> A[i];
  A.push_back(0);
  vector<ll> sage, age;
  ll cash = 1000;
  for (ll i = 0; i < N; i++) {
    ll mn = A[i];
    while (A[i] >= A[i + 1] && i < N) {
      mn = A[i];
      i++;
    }
    i++;
    if (i >= N) break;
    ll mx = A[i];
    while (A[i] < A[i + 1] && i < N) {
      mx = A[i];
      i++;
    }
    ll stock = cash / mn;
    cash -= stock * mn;
    cash += stock * mx;
  }
  cout << cash << endl;
}
