#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vll = vector<ll>;
void solve();
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
void in() {}
template <typename T, class... U>
void in(T& t, U&... u) {
  cin >> t;
  in(u...);
}
void out() { cout << endl; }
template <typename T, class... U>
void out(const T& t, const U&... u) {
  cout << t;
  if (sizeof...(u)) cout << " ";
  out(u...);
}
void solve();
void solve() {
  int N;
  in(N);
  vll A(N);
  for (long long i = 0; i < N; i++) cin >> A[i];
  ll stock = 0;
  ll money = 1000;
  if (A[0] < A[1]) {
    stock = money / A[0];
    money -= stock * A[0];
  }
  for (ll i = 1; i < N - 1; i++) {
    if (A[i - 1] >= A[i] && A[i] < A[i + 1]) {
      stock = money / A[i];
      money -= stock * A[i];
    } else if (A[i - 1] <= A[i] && A[i] > A[i + 1]) {
      money += stock * A[i];
      stock = 0;
    }
  }
  if (stock != 0) money += stock * A[N - 1];
  out(money);
}
