#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long cur = 1000;
  long long mx = 1000;
  vector<long long> a(n);
  for (int j = 0; j < n; j++) cin >> a[j];
  for (int i = 0; i < n - 1; i++) {
    long long cur = 1000;
    int j = i, k = i + 1;
    while (j < n - 1 and k < n) {
      if (a[k] == a[j]) {
        k++;
        continue;
      }
      if (a[k] < a[j]) {
        j = k;
        k = j + 1;
        continue;
      }
      cur = cur - (cur / a[j]) * a[j] + (cur / a[j]) * a[k];
      j = k + 1, k = j + 1;
    }
    mx = max(mx, cur);
  }
  cout << mx << '\n';
  return 0;
}
