#include <bits/stdc++.h>
using namespace std;
const int max_n = 1e5;
const long long mod = 1e9 + 7;
const long long INF = 1e17;
const int inf = 1e5;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
long long mo = 998244353;
struct UnionFind {
  vector<int> par;
  UnionFind(int n) : par(n, -1) {}
  void init(int n) { par.assign(n, -1); }
  int root(int x) {
    if (par[x] < 0)
      return x;
    else
      return par[x] = root(par[x]);
  }
  bool issame(int x, int y) { return root(x) == root(y); }
  bool merge(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    if (par[x] > par[y]) swap(x, y);
    par[x] += par[y];
    par[y] = x;
    return true;
  }
  int size(int x) { return -par[root(x)]; }
};
struct SegmentTree {
  int N;
  vector<int> node;

 public:
  void intit(vector<int> v) {
    int sz = v.size();
    N = 1;
    while (N < sz) N *= 2;
    node.resize(N);
    for (int i = 0; i < sz; i++) node[i + N - 1] = v[i];
    for (int i = N - 2; i >= 0; i--)
      node[i] = min(node[i * 2 + 1], node[i * 2 + 2]);
  }
  void update(int x, int val) {
    x += N - 1;
    node[x + N - 1] = val;
    while (x > 0) {
      x = (x - 1) / 2;
      node[x] = min(node[x * 2 + 1], node[x * 2 + 2]);
    }
  }
  int getmin(int a, int b, int k, int l, int r) {
    if (b <= l || r <= a)
      return inf;
    else if (a <= l && r <= b)
      return node[k];
    else {
      int vl = getmin(a, b, 2 * k + 1, l, (l + r) / 2);
      int vr = getmin(a, b, 2 * k + 2, (l + r) / 2, r);
      return min(vl, vr);
    }
  }
};
vector<long long> divisor(long long n) {
  vector<long long> res;
  for (long long i = 1; i * i <= n; i++) {
    while (n % i == 0) {
      ++res[i];
      n /= i;
    }
  }
  if (n != 1) res[n] = 1;
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<int> v(80);
  for (long long i = 0; i < N; i++) cin >> v[i];
  vector<int> a(80);
  for (int i = N - 1; i >= 0; i--) {
    int j = i;
    if (i == N - 1) a[i] = v[i];
    while (v[j - 1] <= v[j] && j >= 0) {
      a[j - 1] = v[i];
      j--;
    }
    a[j - 1] = v[j - 1];
    i = j;
  }
  int now = 1000;
  int n = 0;
  for (long long i = 0; i < N; i++) {
    if (a[i] == v[i]) {
      now += a[i] * n;
      n = 0;
    }
    if (a[i] > v[i]) {
      n += now / v[i];
      now -= now / v[i] * v[i];
    }
  }
  cout << now << endl;
  return 0;
}
