#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
int main() {
  int n;
  cin >> n;
  int last = 0;
  int mo = 1000;
  cin >> last;
  for (int i = 2; i <= n; i++) {
    int a;
    cin >> a;
    if (a > last) {
      int num = mo / last;
      mo = mo + num * (a - last);
    }
    last = a;
  }
  cout << mo << endl;
}
