#include <bits/stdc++.h>
using namespace std;
const int_fast32_t inf = 1e9 + 7;
const int_fast32_t MOD = 1000000007;
const int_fast64_t llinf = 1e18;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int_fast32_t n;
  cin >> n;
  vector<int_fast32_t> a(n);
  for (int_fast64_t i = 0; i < (n); ++i) cin >> a[i];
  int_fast64_t cur = 1000;
  int_fast32_t pre = a[0];
  for (int_fast64_t i = (1); i < (n); i++) {
    if ((i == n - 1 || a[i] > a[i + 1]) && pre < a[i]) {
      cur = cur % pre + cur / pre * a[i];
      if (i != n - 1) pre = a[i + 1];
    }
  }
  cout << (cur) << "\n";
  return 0;
}
