#include <bits/stdc++.h>
using namespace std;
const long long int INF = (long long int)2e18 + 77;
const int MAX_MONEY = 160005;
const int R = 81;
int dp[R][MAX_MONEY][2];
void solve() {
  int n, i, stocks = 0;
  cin >> n;
  int a[n], m = 1000, mx = 1000;
  for (i = 0; i < n; i++) cin >> a[i];
  i = 0;
  while (i < n - 1) {
    while (i < n - 1 && a[i] > a[i + 1]) i++;
    stocks = (m / a[i]);
    m %= a[i];
    while (i < n - 1 && a[i] <= a[i + 1]) i++;
    m += stocks * a[i];
    stocks = 0;
    mx = max(mx, m);
  }
  cout << mx << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
