#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int N;
int main() {
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  ll ans = 1000;
  ll s = 0;
  for (int i = 0; i < N; i++) {
    ans += a[i] * s;
    s = 0;
    if (i == N - 1) break;
    if (a[i] > a[i + 1]) break;
    if (a[i] < a[i + 1]) {
      s += ans / a[i];
      ans %= a[i];
    }
  }
  cout << ans << endl;
}
