#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
template <class T>
bool umin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool umax(T& a, const T& b) {
  return b > a ? a = b, 1 : 0;
}
template <class A>
void read(vector<A>& v);
template <class A, size_t second>
void read(array<A, second>& a);
template <class T>
void read(T& x) {
  cin >> x;
}
void read(double& d) {
  string t;
  read(t);
  d = stod(t);
}
void read(long double& d) {
  string t;
  read(t);
  d = stold(t);
}
template <class H, class... T>
void read(H& h, T&... t) {
  read(h);
  read(t...);
}
template <class A>
void read(vector<A>& x) {
  for (auto& a : x) read(a);
}
int nxt() {
  int a;
  cin >> a;
  return a;
}
const long long MOD = 1e9 + 7;
int n;
const int mx = 2e5 + 1;
void Titan() {
  read(n);
  vector<int> v(n);
  read(v);
  int cur = 1000;
  for (int i = (0); ((1) > 0 ? i < (n - 1) : i > (n - 1)); i += (1)) {
    long long stock = 0;
    if (v[i] < v[i + 1]) stock = cur / v[i];
    cur += (v[i + 1] - v[i]) * stock;
  }
  cout << cur;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  for (int i = (0); ((1) > 0 ? i < (T) : i > (T)); i += (1)) {
    Titan();
  }
}
