#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<ll> A(N);
  for (ll &i : A) cin >> i;
  ll money = 1000;
  ll beat = 0;
  vector<bool> B(N);
  for (ll i = 0; i < N - 1; i++) {
    if ((long double)A[i + 1] / A[i] > 1)
      B[i] = true;
    else
      B[i] = false;
  }
  for (ll i = 0; i < N; i++) {
    if (B[i]) {
      while (money - A[i] >= 0) {
        beat++;
        money -= A[i];
      }
    } else {
      money += beat * A[i];
      beat = 0;
    }
  }
  cout << money << endl;
}
