#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long tot = 1000;
  long long stocks = 0;
  long long flag = arr[1] > arr[0] ? 1 : 0;
  for (long long i = 0; i < n - 1; i++) {
    if (flag == 1 && arr[i + 1] > arr[i]) {
      stocks += tot / arr[i];
      tot %= arr[i];
      flag = 0;
    } else if (flag == 0 && arr[i + 1] < arr[i]) {
      tot += arr[i] * stocks;
      stocks = 0;
      flag = 1;
    }
  }
  if (stocks > 0) {
    tot += arr[n - 1] * stocks;
  }
  cout << tot << "\n";
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed;
  cout << setprecision(10);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
