#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
template <class T>
bool ch1000000(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;
}
const int MAX = 42;
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  ll stock = 0, money = 1000;
  for (ll i = 0; i < N; i++) {
    money += stock * A[i];
    stock = 0;
    if (A[i] <= A[i + 1]) {
      ll stock_buy = money / A[i];
      stock += stock_buy;
      money -= stock_buy * A[i];
    }
  }
  cout << money << endl;
}
