#include <bits/stdc++.h>
using namespace std;
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;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = 0; i < (n); ++i) cin >> a[i];
  int stack = 0, money = 1000;
  for (long long i = 0; i < (n - 1); ++i) {
    if (a[i] == a[i + 1]) continue;
    if (a[i] > a[i + 1]) {
      money = stack * a[i] + money;
      stack = 0;
    } else if (stack == 0 && a[i] < a[i + 1]) {
      stack = money / a[i];
      money %= a[i];
    }
  }
  money = stack * a[n - 1] + money;
  cout << money << endl;
}
