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