#include <bits/stdc++.h>
using namespace std;
int n;
int a[85];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int nw = 1000;
  int cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    nw += cnt * a[i];
    cnt = 0;
    if (a[i] >= a[i + 1]) continue;
    cnt += nw / a[i];
    nw %= a[i];
  }
  nw += cnt * a[n - 1];
  cout << nw << endl;
  return 0;
}
