#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m = 1000;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int s;
  for (int i = 0; i < n - 1; i++) {
    if (arr[i] >= arr[i + 1]) {
      continue;
    } else {
      s = m / arr[i];
      m = m % arr[i];
      m = m + s * arr[i + 1];
    }
  }
  cout << m << "\n";
  return 0;
}
