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