#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[82], c = 0, b = 1000, d = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    c = (b / a[i]);
    if (c > d) {
      d = c;
    } else if (c < d) {
      b = d * a[i];
    }
  }
  cout << b;
}
