#include <bits/stdc++.h>
using namespace std;
void show(vector<int> v) {
  for (vector<int>::iterator it = v.begin(); it != v.end(); it++) {
    cout << *it << " ";
  }
  cout << endl;
}
int find(int V[], int n, int x) {
  int y = 0;
  V[n];
  for (int i = 0; i < n; i++) {
    if (V[i] == 1 && i + 1 >= x) {
      y = i + 1;
      break;
    }
  }
  return y;
}
int main() {
  int n, MAX = 1000, co_av = 0, sum = 0;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  vector<int>::iterator it = min_element(arr.begin(), arr.end());
  co_av = MAX / *it;
  sum = co_av * (*max_element(arr.begin(), arr.end()));
  cout << sum << endl;
  return 0;
}
