#include <bits/stdc++.h>
using namespace std;
void __print(int32_t x) { cout << x; }
void __print(long long x) { cout << x; }
void __print(long double x) { cout << x; }
void __print(double x) { cout << x; }
void __print(float x) { cout << x; }
void __print(bool x) { cout << (x ? "true" : "false"); }
void __print(char x) { cout << '\'' << x << '\''; }
void __print(const char *x) { cout << '\"' << x << '\"'; }
void __print(const string &x) { cout << '\"' << x << '\"'; }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cout << '{';
  __print(x.first);
  cout << ',';
  __print(x.second);
  cout << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cout << '{';
  for (auto &i : x) cout << (f++ ? "," : ""), __print(i);
  cout << "}";
}
void _print() { cout << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cout << ", ";
  _print(v...);
}
long long power(long long base, long long exp) {
  long long res = 1;
  base %= 1000000007;
  while (exp > 0) {
    if (exp & 1) res = (res * base) % 1000000007;
    base = (base * base) % 1000000007;
    exp = exp >> 1;
  }
  return res;
}
long long inv(long long x) { return power(x, 1000000007 - 2) % 1000000007; }
const long long N = 1e6 + 6, M = N;
long long i, j;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (i = 0; i < n; i++) cin >> a[i];
  vector<long long> v;
  for (i = 0; i < n; i++) {
    long long x = a[i];
    while (i + 1 < n and a[i] == a[i + 1]) i++;
    v.push_back(x);
  }
  n = v.size();
  long long m = 1000, s = 0;
  for (i = 0; i < n; i++) {
    long long x = v[i];
    while (i < n) {
      if (x < v[i])
        break;
      else
        x = v[i];
      i++;
    }
    if (i == n) {
      break;
    } else {
      s += m / x;
      m = m % x;
      m += s * v[i];
      s -= m / v[i];
    }
  }
  cout << m;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
