#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec(n + 1);
  vec[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> vec.at(i);
  }
  int a = 10000;
  int b = 0;
  int k = 1000;
  int d = 0;
  for (int i = 1; i <= n; i++) {
    a = min(a, vec[i]);
    b = max(b, vec[i]);
    d = k - a * (k / a) + b * (k / a);
    if (k < d) {
      k = max(k, d);
      a = vec[i];
      b = 0;
    } else
      max(k, d);
  }
  cout << k << endl;
}
