#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int out(const T &t) {
  print(t);
  putchar('\n');
  return 0;
}
bool is_palindrome(string s) { return s == string(s.rbegin(), s.rend()); }
const long long INF = 1e18;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  vector<int> v(N);
  int ini = A[0];
  for (long long i = 1; i < N; i++) {
    if (ini < A[i]) {
      v[i - 1] = 1;
      ini = A[i];
    } else if (ini > A[i]) {
      v[i - 1] = -1;
      ini = A[i];
    }
  }
  long long ret = 1000;
  long long stk = 0;
  for (long long i = 0; i < N; i++) {
    if (v[i] == 1) {
      stk = (ret / A[i]);
      ret -= (ret / A[i]) * A[i];
    } else if (v[i] == -1 || i == N - 1) {
      ret += stk * A[i];
      stk = 0;
    }
  }
  cout << ret << endl;
  return 0;
}
