#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  short negative = 1;
  x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') negative = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  x *= negative;
}
long long quickpower(long long n, long long k) {
  long long ans = 1;
  while (k) {
    if (k % 2) {
      ans *= n;
      ans %= 1000000007;
    }
    n *= n;
    n %= 1000000007;
    k /= 2;
  }
  return ans;
}
string int_to_string(int n) {
  string s = "";
  while (n) {
    int now = n % 10;
    s += now + '0';
    n /= 10;
  }
  reverse(s.begin(), s.end());
  return s;
}
int string_to_int(string s) {
  int n = 0;
  for (int i = 0, _n = s.size(); i < s.size(); i++) {
    n *= 10;
    n += s[i] - '0';
  }
  return n;
}
int main() {
  ios::sync_with_stdio(0);
  int n;
  int a[100];
  cin >> n;
  for (int i = 0, _n = n; i < n; i++) cin >> a[i];
  int s = 1000 / a[0];
  int m = 1000 % a[0];
  for (int i = 0, _n = n - 1; i < n - 1; i++) {
    if (a[i + 1] > a[i]) {
      m += a[i + 1] * s;
      s = 0;
      s = m / a[i + 1];
      m %= a[i + 1];
    } else {
      m += a[i] * s;
      s = 0;
      s = m / a[i + 1];
      m %= a[i + 1];
    }
  }
  cout << m + s * a[n - 1] << endl;
  return 0;
}
