#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int INFint = 1e9 + 1;
const ll INFll = (ll)1e18 + 1;
ll MOD = 1e9 + 7;
ll dpm[100] = {0};
vector<pair<ll, ll>> dps(100, {0, 0});
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i(0); i < N; i++) cin >> A[i];
  dpm[0] = 1000;
  for (int i(0); i < N; i++) {
    dpm[i + 1] = max(dpm[i], dps[i].first * A[i] + dps[i].second);
    dps[i + 1].first = dpm[i] / A[i];
    dps[i + 1].second = dpm[i] % A[i];
  }
  cout << dpm[N] << endl;
  return 0;
}
