#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  vector<int> a;
  cin >> n;
  int x, i;
  for (i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  int crnmny = 1000, stk;
  for (i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      stk = crnmny / a[i];
      crnmny += (a[i + 1] - a[i]) * stk;
    }
  }
  cout << crnmny;
  return 0;
}
