#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1e9;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long leastbit(long long a) { return a & (-a); }
long long C(int a, int b) {
  long long res = 1;
  for (int i = 0; i < b; i++) res = res * (a - i) / (i + 1);
  return res;
}
long long powmod(long long a, long long b) {
  if (b == 0) return 1;
  long long cnt = powmod(a, b / 2);
  (cnt *= cnt) %= mod;
  if (b & 1) {
    (cnt *= a) %= mod;
  }
  return cnt;
}
class segtree {
 public:
  vector<long long> arr;
  vector<long long> v;
  int n, i;
  segtree(int SZ, vector<long long> hi) {
    i = 0;
    n = SZ;
    v = hi;
    arr.assign(4 * n, 0);
    build(1, 0, n - 1);
  }
  void build(int p, int l, int r) {
    if (l == r) {
      arr[p] = v[i++];
      return;
    }
    int mid = (l + r) / 2;
    build(p * 2, l, mid);
    build(p * 2 + 1, mid + 1, r);
    arr[p] = gcd(arr[p * 2], arr[p * 2 + 1]);
  }
  void sett(int p, int l, int r, int i, int x) {
    if (l == r) {
      arr[p] = x;
      return;
    }
    int mid = (l + r) >> 1;
    if (i <= mid)
      sett(2 * p, l, mid, i, x);
    else
      sett(2 * p + 1, mid + 1, r, i, x);
    arr[p] = gcd(arr[2 * p], arr[2 * p + 1]);
  }
  void sett(int j, int x) { sett(1, 0, n - 1, j, x); }
  long long sum(int p, int l, int r, int a, int b) {
    if (l >= a && r <= b) {
      return arr[p];
    }
    if (b < l || a > r) return 0;
    int mid = (l + r) >> 1;
    return gcd(sum(p * 2, l, mid, a, b), sum(p * 2 + 1, mid + 1, r, a, b));
  }
  long long sum(int l, int r) { return sum(1, 0, n - 1, l, r); }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, arr[85];
  long long sum = 1000;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n - 1; i++) {
    if (arr[i] < arr[i + 1]) {
      int num = sum / arr[i];
      sum += arr[i + 1] * num;
      sum -= num * arr[i];
    }
  }
  cout << sum << endl;
  return 0;
}
