#include <bits/stdc++.h>
using namespace std;
struct Initializer {
  Initializer() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(15) << boolalpha;
  }
} initializer;
inline void print(void) { cout << '\n'; }
template <class T>
inline void print(const T &x) {
  cout << x << '\n';
}
template <class T, class... U>
inline void print(const T &x, const U &...y) {
  cout << x << " ";
  print(y...);
}
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  vector<bool> buy(n, false), sell(n, false);
  buy[0] = true;
  sell[n - 1] = true;
  for (int i = 0; i < (n - 1); ++i) {
    if (a[i] > a[i + 1]) {
      buy[i] = false;
      buy[i + 1] = true;
    }
    if (a[i] < a[i + 1]) {
      sell[i] = false;
      sell[i + 1] = true;
    }
  }
  long long cur = 1000;
  long long stock = 0;
  for (int i = 0; i < (n); ++i) {
    if (buy[i]) {
      long long t = cur / a[i];
      stock += t;
      cur -= (a[i] * t);
    }
    if (sell[i]) {
      cur += (a[i] * stock);
      stock = 0;
    }
  }
  print(cur);
  return 0;
}
