#include <bits/stdc++.h>
template <class T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
  int size = v.size();
  for (int i = 0; i < size; i++) {
    std::cout << v[i];
    if (i != size - 1) std::cout << " ";
  }
  return out;
}
template <class T>
std::istream &operator>>(std::istream &in, std::vector<T> &v) {
  for (auto &el : v) {
    std::cin >> el;
  }
  return in;
}
using namespace std;
template <class T>
void say(bool val, T yes, T no) {
  cout << (val ? yes : no) << "\n";
}
void say(bool val, string yes = "Yes", string no = "No") {
  say<string>(val, yes, no);
}
template <class T>
void chmin(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
T gcd(T n, T m) {
  return n ? gcd(m % n, n) : m;
}
template <class T>
T lcm(T n, T m) {
  int g = gcd(n, m);
  return n * m / g;
}
template <class T>
void unique(std::vector<T> &v) {
  std::sort(v.begin(), v.end());
  v.erase(std::unique(v.begin(), v.end()), v.end());
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long int> a(n);
  cin >> a;
  bool down = false;
  long long int stock = 0;
  long long int ans = 1000;
  if (a[0] < a[1]) {
    stock += (ans / a[0]);
    ans -= (ans / a[0]) * a[0];
  }
  for (int i = 1; i < n - 1; i++) {
    if (!down) {
      if (a[i] > a[i + 1]) {
        ans += stock * a[i];
        stock = 0;
        down = true;
      }
    } else {
      if (a[i] < a[i + 1]) {
        stock += (ans / a[i]);
        ans -= (ans / a[i]) * a[i];
        down = false;
      }
    }
  }
  ans += stock * a[n - 1];
  cout << ans << endl;
}
