#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  bool flag = 0;
  long long cost = 1000;
  long long share = 0;
  long long temp = arr[0];
  for (int i = 1; i < n; i++) {
    if (arr[i] < temp) {
      temp = arr[i];
    } else if (arr[i] > temp) {
      share = cost / temp;
      cost = cost % temp;
      cost = cost + share * arr[i];
      temp = 1000;
    }
  }
  cout << max(1000LL, cost);
  return 0;
}
