#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> v(N + 1, 0);
  for (int i = 1; i <= N; i++) {
    cin >> v[i];
  }
  vector<int> maxnet(N + 1, 0);
  maxnet[0] = 1000;
  for (int day = 1; day <= N; day++) {
    int mn = 1000;
    for (int purch = 1; purch < day; purch++) {
      int stocks = maxnet[purch] / v[purch];
      int left = maxnet[purch] % v[purch];
      int tradenet = left + stocks * v[day];
      mn = max({mn, tradenet, maxnet[purch]});
    }
    maxnet[day] = mn;
  }
  cout << maxnet[N] << "\n";
  return 0;
}
