#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using v_int = vector<int>;
using v2_int = vector<v_int>;
using v_ll = vector<ll>;
using v2_ll = vector<v_ll>;
using v_string = vector<string>;
using v_bool = vector<bool>;
using v2_bool = vector<v_bool>;
using pii = pair<int, int>;
using mii = map<int, int>;
const double PI = 3.1415926535897932;
const int INF = (int)2e9;
const ll LINF = (ll)2e18;
const ll MOD = 1000000007;
const int dc[8] = {1, -1, 0, 0, 1, -1, 1, -1};
const int dr[8] = {0, 0, 1, -1, 1, 1, -1, -1};
template <typename T, typename U>
inline ostream &operator<<(ostream &o, pair<T, U> &p) {
  return o << "{" << p.first << "," << p.second << "}";
}
template <typename T>
inline istream &operator>>(istream &is, vector<T> &vec) {
  for (auto &v : vec) {
    is >> v;
  }
  return is;
}
template <typename T>
inline ostream &operator<<(ostream &os, vector<T> &vec) {
  for (auto &v : vec) {
    os << v << ",";
  }
  return os;
}
template <typename T>
inline ostream &operator<<(ostream &os, vector<vector<T> > &mat) {
  for (auto &row : mat) {
    os << row << endl;
  }
  return os;
}
template <typename T>
inline void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
inline void chmax(T &a, T b) {
  a = max(a, b);
}
int main(void) {
  int n;
  cin >> n;
  v_int a(n);
  cin >> a;
  int money = 1000;
  int l = 0;
  while (l < n) {
    v_int b;
    b.push_back(a[l]);
    while (l < n - 1) {
      if (a[l] <= a[l + 1]) {
        b.push_back(a[l + 1]);
        l++;
      } else {
        break;
      }
    }
    if (b.size() > 1) {
      for (int i = 0; i < (int)(b.size() - 1); i++) {
        int x = money / b[i];
        money -= x * b[i];
        money += x * b[i + 1];
      }
    }
    l++;
  }
  cout << money << endl;
  return 0;
}
