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