#include <bits/stdc++.h>
using namespace std;
int n, a[90];
long long sum = 1000;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n - 1; ++i) {
    long long comp = sum / (long long)a[i] * a[i + 1];
    if (comp > sum) sum = comp;
  }
  cout << sum;
}
