#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
int main() {
  int n;
  cin >> n;
  int money = 1000;
  int stock = 0;
  int A[100];
  for (int i = 0; i < (int)n; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < (int)n - 1; i++) {
    if (A[i] < A[i + 1]) {
      stock += money / A[i];
      money = money - stock * A[i];
      money += stock * A[i + 1];
      stock = 0;
    }
  }
  cout << money << endl;
  return 0;
}
