#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < (n); ++i) cin >> arr[i];
  int cash = 1000, kabu = 0;
  for (int i = 0; i < (n - 1); ++i) {
    if (arr[i] <= arr[i + 1]) {
      int tmp = (cash / arr[i]);
      cash -= tmp * arr[i];
      kabu += tmp;
    } else {
      cash += kabu * arr[i];
      kabu = 0;
    }
  }
  cash += kabu * arr[n - 1];
  cout << cash << endl;
}
