#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;
  for (int i = 0; i < n - 1; i++) {
    if (arr[i] < arr[i + 1]) {
      share = cost / arr[i];
      cost = cost % arr[i];
      cost = cost + share * arr[i + 1];
      i++;
    }
  }
  cout << cost;
  return 0;
}
