#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i, j;
  cin >> n;
  long long arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  long long amount = 1000;
  long long pur;
  int minm;
  i = 0;
  int pos, purindex;
  while (i < n) {
    int flag = 0;
    pos = 1;
    for (j = i + 1; j < n; j++) {
      if (arr[j] > arr[i]) {
        flag = 1;
        pos = j;
        break;
      }
    }
    if (flag == 1) {
      long long minm = arr[i];
      purindex = i;
      for (long long k = pos - 1; k >= i; k--) {
        if (arr[k] < minm) {
          minm = arr[k];
          purindex = k;
        }
      }
      pur = amount / arr[purindex];
      amount -= arr[purindex] * pur;
      amount += arr[pos] * pur;
      i += pos;
    }
  }
  cout << amount;
  return 0;
}
