#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int posession = 1000;
  int stock = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1])
      continue;
    else if (a[i] > a[i + 1]) {
      if (stock) {
        posession += stock * a[i];
        stock = 0;
      }
    } else if (a[i] < a[i + 1]) {
      int newStock = posession / a[i];
      stock += newStock;
      posession -= a[i] * newStock;
    }
  }
  if (stock) {
    posession += stock * a[n - 1];
    stock = 0;
  }
  cout << posession << endl;
}
