#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int N = 1e5 + 7, M = 1e7, OO = 0x3f3f3f3f;
int maximums[85];
int main() {
  int n, array1[100], i;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &array1[i]);
  }
  int maxi = -OO;
  for (i = n - 1; i >= 0; --i) {
    maxi = max(maxi, array1[i]);
    maximums[i] = maxi;
  }
  maxi = 1000;
  for (i = 0; i < n; ++i) {
    if (array1[i] < maximums[i]) {
      maxi = max(1000 / array1[i] * maximums[i], maxi);
    }
  }
  printf("%d", maxi);
  return 0;
}
