#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <typename T, typename U>
ostream &operator<<(ostream &s, const pair<T, U> m) {
  cout << "(" << m.first << ", " << m.second << ")";
  return s;
}
template <typename T, typename U>
ostream &operator<<(ostream &s, const map<T, U> m) {
  ll c = 0;
  cout << "{ ";
  for (auto &(i) : (m)) cout << i << (c++ == m.size() - 1 ? " " : ", ");
  cout << "}";
  return s;
}
template <typename T>
ostream &operator<<(ostream &s, const vector<T> &v) {
  cout << "{ ";
  for (ll(i) = 0LL; (i) < (ll)(v.size()); (i)++)
    cout << v[i] << (i == v.size() - 1 ? " " : ", ");
  cout << "}";
  return s;
}
template <typename T>
ostream &operator<<(ostream &s, const list<T> &v) {
  ll c = 0;
  cout << "{ ";
  for (auto &(i) : (v)) cout << i << (c++ == v.size() - 1 ? " " : ", ");
  cout << "}";
  return s;
}
ll N;
vector<ll> A;
ll maxi = 0;
void dfs(ll index, ll kabu, ll money) {
  if (index == N - 1) {
    maxi = max(maxi, money + A.back() * kabu);
    return;
  }
  {
    ll temp = money / A[index];
    dfs(index + 1, kabu + temp, money - temp * A[index]);
  }
  { dfs(index + 1, 0, money + A[index] * kabu); }
}
int main(void) {
  ll money = 1000;
  ll kabu = 0;
  cin >> N;
  vector<vector<pair<ll, ll>>> dp(N + 1, vector<pair<ll, ll>>(2));
  A.resize(N);
  for (ll(i) = 0LL; (i) < (ll)(N); (i)++) cin >> A[i];
  ll prev = numeric_limits<ll>::max();
  for (ll(i) = 0LL; (i) < (ll)(N); (i)++) {
    bool flag = false;
    for (ll(j) = (ll)(i + 1); (j) < (ll)(N); (j)++) {
      if (A[i] < A[j]) {
        flag = true;
        break;
      }
    }
    if (prev > A[i] && flag) {
      ll temp = money / A[i];
      kabu += temp;
      money -= temp * A[i];
    } else if (prev < A[i]) {
      money += A[i] * kabu;
      kabu = 0;
    }
    prev = A[i];
  }
  cout << money << endl;
  return 0;
}
