#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
class UnionFind {
 private:
  vll p, rank, size;
  ll numSets;

 public:
  UnionFind(int n) {
    rank.assign(n, 0);
    p.assign(n, 0);
    size.assign(n, 1);
    numSets = n;
    for (auto i = 0; i < n; ++i) {
      p[i] = i;
    }
  }
  int findSet(int i) { return (p[i] == i) ? i : (p[i] = findSet(p[i])); }
  bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }
  void unionSet(int i, int j) {
    if (!isSameSet(i, j)) {
      auto x = findSet(i), y = findSet(j);
      if (rank[x] > rank[y]) {
        p[y] = x;
        size[x] += size[y];
      } else {
        p[x] = y;
        size[y] += size[x];
        if (rank[x] == rank[y]) {
          rank[y]++;
        }
      }
      numSets--;
    }
  }
  ll numDisjointSets() { return numSets; }
  ll sizeOfSet(int i) { return size[findSet(i)]; }
};
class SegmentTreeRMQ {
 private:
  vll st, array;
  vector<bool> marked;
  ll n;
  ll left(ll p) { return p << 1; }
  ll right(ll p) { return (p << 1) + 1; }
  void build(ll p, ll l, ll r) {
    if (l == r) {
      st[p] = l;
    } else {
      build(left(p), l, (l + r) / 2);
      build(right(p), (l + r) / 2 + 1, r);
      ll p1 = st[left(p)], p2 = st[right(p)];
      st[p] = (array[p1] <= array[p2]) ? p1 : p2;
    }
  }
  ll rmq(ll p, ll l, ll r, ll i, ll j) {
    if (i > r || j < l) return -1;
    if (i <= l && r <= j) return st[p];
    push_updates(p);
    auto p1 = rmq(left(p), l, (l + r) / 2, i, j);
    auto p2 = rmq(right(p), (l + r) / 2 + 1, r, i, j);
    if (p1 == -1) return p2;
    if (p2 == -1) return p1;
    return (array[p1] <= array[p2]) ? p1 : p2;
  }
  void push_updates(ll p) {
    if (marked[p]) {
      st[left(p)] = st[right(p)] = st[p];
      marked[left(p)] = marked[right(p)] = true;
      marked[p] = false;
    }
  }
  void update(ll p, ll l, ll r, ll i, ll e) {
    if (i < l || r < i) return;
    if (l == r) {
      if (l == i) {
        array[l] = e;
        st[p] = e;
      }
    } else {
      update(left(p), l, (l + r) / 2, i, e);
      update(right(p), (l + r) / 2 + 1, r, i, e);
      ll p1 = st[left(p)], p2 = st[right(p)];
      st[p] = (array[p1] <= array[p2]) ? p1 : p2;
    }
  }
  void update(ll p, ll l, ll r, ll ul, ll ur, ll e) {
    if (l > r) return;
    if (ul <= l && r <= ur) {
      st[p] = e;
      marked[p] = true;
    } else {
      push_updates(p);
      update(left(p), l, (l + r) / 2, ul, ur, e);
      update(right(p), (l + r) / 2 + 1, r, ul, ur, e);
    }
  }

 public:
  SegmentTreeRMQ(const vll &A) {
    array = A;
    n = A.size();
    st.assign(4 * n, 0);
    marked.assign(4 * n, false);
    build(1, 0, n - 1);
  }
  ll rmq(ll i, ll j) { return rmq(1, 0, n - 1, i, j); }
  void update(ll i, ll e) { update(1, 0, n - 1, i, e); }
  void update(ll l, ll r, ll e) { update(1, 0, n - 1, l, r, e); }
};
class FenwickTree {
 private:
  vll ft;
  ll LSOne(ll i) { return i & (-i); }

 public:
  FenwickTree(ll n) { ft.assign(n + 1, 0); }
  ll rsq(ll b) {
    ll sum = 0;
    for (; b; b -= LSOne(b)) sum += ft[b];
    return sum;
  }
  ll rsq(ll a, ll b) { return rsq(b) - (a == 1 ? 0 : rsq(a)); }
  void adjust(ll k, ll v) {
    for (; k < ft.size(); k += LSOne(k)) ft[k] += v;
  }
};
template <class T>
string to_string(vector<T> v) {
  string str = "";
  for (auto &x : v) {
    str += to_string(x);
    str.push_back(' ');
  }
  if (str.length() > 0) str.pop_back();
  return str;
}
void A() {
  int rating;
  scanf("%d", &rating);
  int kyu = 0;
  if (rating >= 400 && rating <= 599) {
    kyu = 8;
  } else if (rating >= 600 && rating <= 799) {
    kyu = 7;
  } else if (rating >= 800 && rating <= 999) {
    kyu = 6;
  } else if (rating >= 1000 && rating <= 1199) {
    kyu = 5;
  } else if (rating >= 1200 && rating <= 1399) {
    kyu = 4;
  } else if (rating >= 1400 && rating <= 1599) {
    kyu = 3;
  } else if (rating >= 1600 && rating <= 1799) {
    kyu = 2;
  } else if (rating >= 1800 && rating <= 1999) {
    kyu = 1;
  }
  printf("%d\n", kyu);
}
void B() {
  ll a, b, c, k;
  scanf("%lld%lld%lld%lld", &a, &b, &c, &k);
  while (!(b > a && c > b) && k > 0) {
    --k;
    if (a >= b) {
      b *= 2;
    } else if (b >= c) {
      c *= 2;
    }
  }
  if (b > a && c > b) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}
void D() {
  int prices[80 + 5];
  int n;
  scanf("%d", &n);
  for (auto i = 0; i < n; i++) {
    scanf("%d", &prices[i]);
  }
  int money = 1000;
  int stocks = 0;
  int stock_pointer = 0;
  while (stock_pointer < n) {
    while (stock_pointer < n - 1 &&
           prices[stock_pointer] >= prices[stock_pointer + 1])
      stock_pointer++;
    if (stock_pointer == n - 1) break;
    stocks += money / prices[stock_pointer];
    money %= prices[stock_pointer];
    stock_pointer++;
    money += stocks * prices[stock_pointer];
    stocks = 0;
  }
  printf("%d\n", money);
}
int main() {
  D();
  return 0;
}
