#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long int n) {
  if (n == 1) {
    return false;
  }
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main(void) {
  long long int n, res, t, k;
  vector<long long int> a;
  res = 1000;
  k = 0;
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    cin >> t;
    a.push_back(t);
  }
  for (long long int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      k += res / a[i];
      res -= a[i] * k;
    } else if (a[i] > a[i + 1]) {
      res += a[i] * k;
      k = 0;
    }
  }
  for (; k > 0;) {
    k--;
    res += a[n - 1];
  }
  cout << res;
  return 0;
}
