#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, yen = 1000, stock = 0;
  cin >> n;
  int a[100];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n - 1; i++) {
    if (a[i + 1] == a[i]) continue;
    if (a[i + 1] > a[i]) {
      int ns = yen / a[i];
      stock += ns;
      yen = yen - ns * a[i];
    } else {
      yen = yen + stock * a[i];
      stock = 0;
    }
  }
  yen += stock * a[n - 1];
  cout << yen;
}
