#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int maxpos = 0, max = INT_MIN, min = INT_MAX, minpos = 0;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > max) {
      maxpos = i;
      max = a[i];
    }
    if (a[i] < min) {
      minpos = i;
      min = a[i];
    }
  }
  int f = 0, tempmax = 0;
  int stocks = 0, money = 1000;
  if (maxpos == 0) {
    cout << "1000\n";
    return 0;
  } else if (maxpos == n - 1 && minpos == 0) {
    stocks = money / a[0];
    money -= stocks * a[0];
    money += stocks * a[n - 1];
    cout << money << "\n";
  } else {
    stocks = money / a[0];
    money = money - stocks * a[0];
    for (int i = 1; i != maxpos + 1; i++) {
      if (i == maxpos) {
        money += stocks * a[i];
        stocks = 0;
        break;
      }
      if (a[i] > a[i - 1]) {
        money += stocks * a[i];
        stocks = 0;
      } else if (a[i] < a[i - 1]) {
        stocks = money / a[i];
        money = money - stocks * a[i];
      }
    }
    cout << money << "\n";
  }
  return 0;
}
