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