#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, stock = 0, cash = 1000;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int maxA = a[0], minA = a[0];
  for (int i = 0; i < n - 1; i++) {
    maxA = max(maxA, a[i]);
    minA = min(minA, a[i]);
    if (a[i] > a[i + 1] && minA != a[i]) {
      stock = cash / minA;
      cash %= minA;
      cash += stock * maxA;
      maxA = a[i + 1];
      minA = a[i + 1];
    } else if (i + 1 == n - 1) {
      if (minA < a[i + 1]) {
        maxA = a[i + 1];
        stock = cash / minA;
        cash %= minA;
        cash += stock * maxA;
        maxA = a[i + 1];
        minA = a[i + 1];
      }
    }
  }
  cout << cash;
}
