#include <bits/stdc++.h>
using ll = long long;
using namespace std;
using Graph = vector<vector<int>>;
using Field = vector<vector<int>>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
const double PI = (acos(-1));
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  vector<int> dp(n + 1);
  dp[0] = 1000;
  for (int i = 0; i < (n); ++i) {
    if (a[i] < a[i + 1]) {
      dp[i + 1] = dp[i] + (dp[i] / a[i]) * (a[i + 1] - a[i]);
    } else {
      dp[i + 1] = dp[i];
    }
  }
  cout << dp[n] << endl;
}
