#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
const int dr[4] = {-1, 0, 1, 0};
const int dc[4] = {0, -1, 0, 1};
const int drr[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int dcc[8] = {0, -1, -1, -1, 0, 1, 1, 1};
template <typename T, typename TT>
ostream& operator<<(ostream& s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, vector<T> t) {
  for (int i = 0; i < ((int)((t).size())); i++) s << t[i] << " ";
  return s;
}
bool ckmin(int& a, int b) { return b < a ? a = b, true : false; }
bool ckmax(int& a, int b) { return b > a ? a = b, true : false; }
class UnionFind {
 private:
  vector<int> rank, p;

 public:
  UnionFind(int n) {
    for (int i = 0; i < n; i++) p.push_back(i);
    rank.assign(n, 1);
  }
  int findSet(int s) { return (p[s] == s) ? s : (p[s] = findSet(p[s])); }
  bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }
  void unionSet(int i, int j) {
    if (isSameSet(i, j)) return;
    int x = findSet(i), y = findSet(j);
    if (rank[x] > rank[y]) {
      p[y] = x;
      rank[x] += rank[y];
    } else {
      p[x] = y;
      rank[y] += rank[x];
    }
  }
  int sz(int x) {
    int px = findSet(x);
    return rank[px];
  }
};
double x_y(int x1, int y1, int x2, int y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int n, dt[100], dp[100][5010][205];
int rec(int id, int rem, int sp) {
  if (rem < 0 || sp < 0) return -99999999;
  if (id >= n) return 0;
  int& ret = dp[id][rem][sp];
  if (ret != -1) return ret;
  int x = rec(id + 1, rem, sp);
  int y = 0, z = 0;
  y = dt[id] + rec(id, rem + dt[id], sp - 1);
  z = rec(id, rem - dt[id], sp + 1);
  return ret = (x < (y < z ? z : y) ? (y < z ? z : y) : x);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &dt[i]);
  vector<int> less = {0};
  for (int i = 1; i < n; i++)
    if (dt[i] < dt[i - 1]) less.push_back(i);
  int tot = 1000;
  for (int i = 1; i < less.size(); i++) {
    int stc = tot / dt[less[i - 1]];
    int cur = tot % dt[less[i - 1]] + stc * (dt[less[i] - 1]);
    tot = cur;
  }
  if (less.back() < n - 1) {
    int stc = tot / dt[less.back()];
    int cur = tot % dt[less.back()] + stc * (dt[n - 1]);
    tot = cur;
  }
  cout << tot << endl;
  return 0;
}
