#include <bits/stdc++.h>
#pragma GCC optimize("O3")
template <class T, class U>
bool chmax(T &a, U b) {
  if (a < b) a = b;
  return true;
}
template <class T, class U>
bool chmin(T &a, U b) {
  if (b < a) a = b;
  return true;
}
using ll = long long;
using ld = long double;
using namespace std;
constexpr ll MOD = 1000000007;
signed main() {
  cout << fixed << setprecision(20);
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int ans = 1000;
  vector<int> a(n);
  for (ll i = 0; i < (n); ++i) cin >> a[i];
  for (ll i = 0; i < (n - 1); ++i) {
    if (a[i] >= a[i + 1]) continue;
    int tmp = ans / a[i];
    ans = tmp * a[i + 1] + (ans % a[i]);
  }
  cout << ans << '\n';
  return (0);
}
