#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long LINF = 1LL << 60;
const int INF = 1 << 30;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  vector<long long> b;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long tmp = a[0];
  bool down = true;
  for (int i = 1; i < n; i++) {
    if (down) {
      if (tmp >= a[i]) {
        tmp = a[i];
      } else {
        b.push_back(tmp);
        down = 0;
      }
    } else {
      if (tmp <= a[i]) {
        tmp = a[i];
      } else {
        b.push_back(tmp);
        down = 1;
      }
    }
  }
  if ((down == 1 && b[b.size() - 1] > a[n - 1]) ||
      (down == 0 && b[b.size() - 1] < a[n - 1])) {
    b.push_back(a[n - 1]);
  }
  long long res = 1000;
  long long money = 1000;
  long long stock = 0;
  for (int i = 0; i < b.size(); i++) {
    if (i % 2 == 0) {
      stock = money / b[i];
      money = money - (money / b[i]) * b[i];
    } else {
      money += b[i] * stock;
      stock = 0;
      res = max(res, money);
    }
  }
  cout << res << endl;
  return 0;
}
