#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, SWAP, money = 1000, result, maax = -1, minn = 10000;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[n];
  }
  for (int i = 0; i < n; i++) {
    if (arr[i] < minn) minn = arr[i];
    if (arr[i] > maax) maax = arr[i];
  }
  result = money / minn;
  result = result * maax;
  cout << result;
  return 0;
}
