#include <bits/stdc++.h>
using ll = long long;
using namespace std;
constexpr int MOD = 1e9 + 7;
constexpr ll MOD_LL = ll(1e9 + 7);
int main(void) {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  ll ans = 1000, money = 1000, stock = 0;
  for (int i = 0; i < n; ++i) {
    if (i < n - 1 && money > a[i] && a[i] < a[i + 1]) {
      stock = money / a[i];
      money = money % a[i];
    }
    if (i > 0) {
      if (a[i - 1] < a[i] && stock > 0) {
        money += a[i] * stock;
        stock = 0;
        ans = max(ans, money);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
