#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int mo = 1000;
  int last, now;
  cin >> n;
  for (int i = 0; i < (n); i++) {
    cin >> now;
    if (i != 0 && last < now) {
      int num = mo / last;
      mo += (now - last) * num;
    }
    last = now;
  }
  cout << mo;
  return 0;
}
