#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
const int INF = 1001001001;
const long long LINF = 1001002003004005006ll;
const long long MOD = 1e9 + 7;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int ans = 1000;
  for (int i = 0; i < (n - 1); ++i) {
    int stock = 0;
    if (a[i] < a[i + 1]) stock = ans / a[i];
    ans += (a[i + 1] - a[i]) * stock;
  }
  cout << ans << "\n";
  return 0;
}
