#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]);
  }
  long long money = 1000;
  for (long long i = 0; i < N - 1; i++) {
    int stock = 0;
    if (A[i] < A[i + 1]) {
      stock = money / A[i];
      money -= stock * A[i];
    }
    money += A[i + 1] * stock;
  }
  cout << money << endl;
  return 0;
}
