#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  a.push_back(0);
  int ans = 0;
  int mon = 1000;
  int cab = 0;
  for (int i = 0; i < (int)(n); i++) {
    cab += mon / a[i];
    mon %= a[i];
    if (a[i] < a[i + 1]) {
      continue;
    } else {
      mon += cab * a[i];
      cab = 0;
    }
  }
  cout << mon << endl;
  return 0;
}
