#include <bits/stdc++.h>
using namespace std;
struct ios_accelerate {
  ios_accelerate() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
  }
} CALL;
using LL = long long;
using UL = unsigned long;
using ULL = unsigned long long;
template <typename T>
using V = vector<T>;
template <typename T>
using VV = vector<vector<T>>;
template <typename T>
using P = pair<T, T>;
const double PI = 3.141592653589793;
const int MOD = 1000000007;
const LL INF64 = static_cast<LL>(1e18) + 2;
const int INF = static_cast<int>(1e9) + 2;
template <typename T>
inline void upsort(vector<T>& x) {
  sort(x.begin(), x.end());
}
template <typename T>
inline void downsort(vector<T>& x) {
  sort(x.begin(), x.end(), greater<T>());
}
template <typename T>
inline void col(T x) {
  cout << x << '\n';
}
template <>
inline void col(double x) {
  cout << fixed << setprecision(12) << x << '\n';
}
signed main() {
  int n;
  cin >> n;
  V<int> a(n);
  for (auto&(ai) : (a)) {
    cin >> ai;
  }
  V<int> peak(n, 0);
  bool up = false;
  if (a[0] < a[1]) {
    up = true;
    peak[0] = -1;
  }
  for (auto(i) = (1); (i) < (n - 1); (i)++) {
    if (up) {
      if (a[i] > a[i + 1]) {
        up = false;
        peak[i] = 1;
      }
    } else {
      if (a[i] < a[i + 1]) {
        up = true;
        peak[i] = -1;
      }
    }
  }
  if (up) {
    peak[n - 1] = 1;
  }
  int yen = 1000, kabu = 0;
  for (auto(i) = (n)*0; (i) < (n); (i)++) {
    if (peak[i] == -1) {
      kabu = yen / a[i];
      yen -= a[i] * kabu;
    } else if (peak[i] == 1) {
      yen += a[i] * kabu;
      kabu = 0;
    }
  }
  col(yen);
  return 0;
}
