#include <bits/stdc++.h>
using namespace std;
const char en = '\n';
int main() {
  long long n, i, arr[100], ans = 1000, buyp = (int(1e9)), sellp = 0, j;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (i = 0; i < n; i++) {
    if (arr[i] < buyp) buyp = arr[i];
    if (arr[i] > buyp) {
      sellp = arr[i];
      for (j = i + 1; j < n && arr[j] > arr[i]; j++) {
        sellp = arr[j];
      }
      int nstock = ans / buyp;
      ans = (ans % buyp == 0) ? 0 : ans - (nstock * buyp);
      ans += (nstock * sellp);
      buyp = (int(1e9));
      i = j - 1;
    }
  }
  cout << ans << endl;
  return 0;
}
