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