#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
const long long L_INF = 1LL << 60;
const long long INF = 2147483647;
const double PI = acos(-1);
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;
}
template <class T>
void debug(T v) {
  for (long long i = 0; i < v.size(); ++i) cout << v[i] << " ";
  cout << endl;
}
const long long dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const long long dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  long long now = 1000;
  long long j = 0;
  for (long long i = 0; i < n; i = j) {
    j = i + 1;
    long long l_price = a[i];
    while (j < n && l_price > a[j]) {
      j++;
      l_price = min(l_price, a[j]);
    }
    if (l_price < a[j]) {
      long long rot = now / l_price;
      now -= rot * l_price;
      now += rot * a[j];
    }
  }
  cout << now << endl;
}
