#include <bits/stdc++.h>
using namespace std;
using vl = vector<long long>;
using vvl = vector<vl>;
constexpr int MOD = 1000000007;
using long long = long long;
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
void print(const std::vector<int> &v) {
  std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
  std::cout << std::endl;
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < (long long)N; i++) {
    cin >> A[i];
  }
  long long money = 1000LL;
  long long stocks = 0LL;
  for (long long i = 0; i < (long long)N - 1; i++) {
    if (A[i] < A[i + 1]) {
      stocks += money / A[i];
      money -= stocks * A[i];
    } else if (A[i] > A[i + 1]) {
      money += stocks * A[i];
      stocks = 0LL;
    }
  }
  money += stocks * A[N - 1];
  cout << money << endl;
  return 0;
}
