#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long DivisorCount(long long x) {
  long long ans = 1;
  for (int i = 2; i <= sqrt(x); i++) {
    int cnt = 0;
    while (x % i == 0) {
      cnt++;
      x /= i;
    }
    ans *= (cnt + 1);
    if (x == 1) break;
  }
  if (x != 1) ans *= 2;
  return ans;
}
void Main() {
  long long N;
  cin >> N;
  vector<long long> A(N, 0);
  for (long long i = 0; i < N; i++) cin >> A[i];
  long long money = 1000;
  long long stock = 0;
  bool isBuying = false;
  for (long long i = 0; i < N; i++) {
    bool isMin = true, isMax = true;
    for (long long k = i + 1; k < N; k++) {
      if (A[i] < A[k]) isMax = false;
      if (A[i] > A[k]) isMin = false;
    }
    if (isBuying && i == N - 1) {
      money += stock * A[i];
      stock = 0;
      isBuying = false;
      break;
    }
    if (isBuying && !isMin) {
      money += stock * A[i];
      stock = 0;
      isBuying = false;
      continue;
    }
    if (!isBuying && !isMax) {
      stock += (money / A[i]);
      money -= stock * A[i];
      isBuying = true;
      continue;
    }
  }
  cout << money << endl;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}
