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