#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  for (auto &x : arr) cin >> x;
  long long res = 1000, stocks = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      if (i + 1 < n and arr[i] < arr[i + 1] and i != n - 1) {
        stocks += (res / arr[i]);
        res -= arr[i] * (res / arr[i]);
      }
    } else if (i == n - 1) {
      if (i - 1 >= 0 and arr[i] > arr[i - 1]) {
        res += stocks * arr[i];
        stocks = 0;
      }
    } else {
      if (arr[i] > arr[i - 1] and arr[i] >= arr[i + 1]) {
        res += stocks * arr[i];
        stocks = 0;
      } else if (arr[i] < arr[i - 1] and arr[i] <= arr[i + 1]) {
        stocks += (res / arr[i]);
        res -= arr[i] * (res / arr[i]);
      }
    }
  }
  cout << res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) solve();
  return 0;
}
