#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 5;
const long long int inf64 = 1e18 + 5;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, i;
  cin >> n;
  long long int arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  long long int curr = 1000;
  for (int i = 0, j = 0; i < n; i = j) {
    while (j + 1 < n && arr[j] > arr[j + 1]) ++j;
    while (j + 1 < n && arr[j] <= arr[j + 1]) ++j;
    long long int stocks = curr / arr[i];
    long long int rem = curr % arr[i];
    long long int res = stocks * arr[j] + rem;
    curr = max(curr, res);
    ++j;
  }
  cout << curr;
}
