#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chmax(T &ans, T t) {
  if (t > ans) ans = t;
}
template <class T>
inline void chmin(T &ans, T t) {
  if (t < ans) ans = t;
}
template <class T>
T inf = numeric_limits<T>::max();
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
  }
  A[N + 1] = -1;
  long long ans = 1000;
  vector<long long> rg(N);
  long long left;
  long long right;
  for (long long i = 0; i < N - 1; ++i) {
    left = i;
    right = i;
    for (long long j = i + 1; j < N + 1; ++j) {
      if (A[j - 1] > A[j]) {
        right = j - 1;
        break;
      }
    }
    if (left == right)
      continue;
    else {
      rg[left] = 1;
      rg[right] = 2;
    }
  }
  long long l = -1;
  long long kabu = 0;
  long long money = 1000;
  for (long long i = 0; i < N; ++i) {
    if (rg[i] == 1 && l == -1) {
      kabu = money / A[i];
      money -= kabu * A[i];
      l = i;
    } else if (rg[i] == 2 && l != -1) {
      money += kabu * A[i];
      kabu = 0;
      l = -1;
    }
  }
  cout << money << endl;
}
