#include <bits/stdc++.h>
using namespace std;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
template <class T, class S>
inline bool chmax(T &a, S b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class S>
inline bool chmin(T &a, S b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
void line(vector<T> &x) {
  for (auto &&xi : x) cin >> xi;
}
inline void IN(void) { return; }
template <typename First, typename... Rest>
void IN(First &first, Rest &...rest) {
  cin >> first;
  IN(rest...);
  return;
}
template <class T>
void UNIQUE(vector<T> &x) {
  sort((x).begin(), (x).end());
  x.erase(unique((x).begin(), (x).end()), x.end());
}
template <class T>
void print_vec(T first, T end) {
  for (auto i = first; i < end - 1; i++) cout << *i << " ";
  cout << *(end - 1) << "\n";
}
template <class... T>
void debug_print(T... args) {
  vector<long long> tmp = initializer_list<long long>{args...};
  print_vec((tmp).begin(), (tmp).end());
}
template <class T>
void print(T a) {
  cout << a << "\n";
}
vector<string> Yes = {"No", "Yes"};
vector<string> YES = {"NO", "YES"};
int ord(char x) { return (int)(x - 'a'); }
char chr(long long x) { return (char)(x + (long long)('a')); }
long long mod = 1e9 + 7;
long long sum(vector<long long> a) {
  long long ret = 0;
  for (auto &&v : a) ret += v;
  return ret;
}
long long vmini(vector<long long> a, long long &index) {
  long long ret = LLONG_MAX;
  for (int i = 0; i < (int)((int)(a).size()); i++) {
    if (chmin(ret, a[i])) index = i;
  }
  return ret;
}
long long vmaxi(vector<long long> a, long long &index) {
  long long ret = -LLONG_MAX;
  for (int i = 0; i < (int)((int)(a).size()); i++) {
    if (chmax(ret, a[i])) index = i;
  }
  return ret;
}
long long vmin(vector<long long> a) {
  long long ret = LLONG_MAX;
  for (auto &&v : a) chmin(ret, v);
  return ret;
}
long long vmax(vector<long long> a) {
  long long ret = -LLONG_MAX;
  for (auto &&v : a) chmax(ret, v);
  return ret;
}
int main() {
  int n;
  IN(n);
  vector<long long> a(n);
  line(a);
  int cash = 1000;
  int tmp;
  for (int i = 1; i < (int)(n); i++) {
    if (a[i] > a[i - 1]) {
      tmp = 0;
      while (cash >= a[i - 1]) {
        cash -= a[i - 1];
        tmp++;
      }
      cash += tmp * a[i];
    }
  }
  print(cash);
}
