#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("03")
#pragma GCC optimize("unroll-loops")
using namespace std;
constexpr int INF = 1 << 30;
constexpr long long LINF = 1LL << 60;
constexpr long long mod = 1e9 + 7;
constexpr int NIL = -1;
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int a[100];
int n;
pair<int, int> dp[100][2];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> a[i];
  dp[0][0] = {1000, 0};
  dp[0][1] = {1000, 0};
  for (int i = (1); i <= (n); i++) {
    dp[i][0] =
        dp[i - 1][0].first > dp[i - 1][1].first + dp[i - 1][1].second * a[i]
            ? dp[i - 1][0]
            : make_pair(dp[i - 1][1].first + dp[i - 1][1].second * a[i], 0);
    dp[i][1] =
        dp[i - 1][1].second > dp[i - 1][0].first / a[i]
            ? dp[i - 1][1]
            : make_pair(dp[i - 1][0].first - (dp[i - 1][0].first / a[i]) * a[i],
                        dp[i - 1][0].first / a[i]);
  }
  cout << dp[n][0].first << "\n";
  return 0;
}
