#include <bits/stdc++.h>
using namespace std;
const int maxn = 111;
int n, a[maxn];
int main() {
  memset(a, 0, sizeof(a));
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  vector<pair<int, int> > box;
  int low = a[1];
  a[n + 1] = 201;
  for (int i = 1; i <= n; i++) {
    if (a[i] > a[i + 1]) {
      box.push_back(make_pair(low, a[i]));
      low = a[i + 1];
    }
  }
  if (a[n] > low) box.push_back(make_pair(low, a[n]));
  int len = box.size();
  int mon = 1000;
  for (int i = 0; i < len; i++) {
    int by = box[i].first;
    int sl = box[i].second;
    int num = mon / by;
    mon = mon % by;
    mon += sl * num;
  }
  cout << mon << endl;
  return 0;
}
