#include <bits/stdc++.h>
using namespace std;
long long arr[82];
int main() {
  int n;
  cin >> n;
  long long sum = 1000, buy = 0;
  for (int i = 1; i <= n; i++) scanf("%lld", &arr[i]);
  arr[0] = 10000;
  arr[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    if (arr[i] < arr[i + 1]) {
      buy = sum / arr[i];
      sum -= buy * arr[i];
    } else if (arr[i] > arr[i + 1]) {
      sum += buy * arr[i];
      buy = 0;
    }
  }
  cout << sum << endl;
  return 0;
}
