#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);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> stock(n + 1, 0);
  vector<long long> nokori(n + 1, 0);
  vector<long long> money(n + 1, 0);
  money[0] = 1000;
  for (int i = 1; i <= n; i++) {
    if (stock[i - 1] <= money[i - 1] / a[i - 1]) {
      stock[i] = money[i - 1] / a[i - 1];
      nokori[i] = money[i - 1] % a[i - 1];
    } else {
      stock[i] = stock[i - 1];
      nokori[i] = nokori[i - 1];
    }
    if (money[i - 1] <= stock[i - 1] * a[i - 1] + nokori[i - 1]) {
      money[i] = stock[i - 1] * a[i - 1] + nokori[i - 1];
    } else
      money[i] = money[i - 1];
  }
  cout << money[n] << endl;
  return 0;
}
