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