#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int i = 0, sum = 1000;
  while (i < (n - 1)) {
    if (a[i] < a[i + 1]) {
      k = sum / a[i];
      sum = sum % a[i];
      sum += k * a[i + 1];
      i += 2;
    } else
      i++;
  }
  cout << sum << endl;
  return 0;
}
