#include <bits/stdc++.h>
using namespace std;
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;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int const INF = 1001001001;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  long long res = 1000;
  long long cur = INF;
  for (int i = 0; i < (n); ++i) {
    if (cur < a[i]) {
      long long st = res / cur;
      res += st * (a[i] - cur);
      cur = INF;
    } else {
      cur = a[i];
    }
  }
  cout << res << endl;
  return 0;
}
