#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;
    long long minm = arr[i];
    purindex = i;
    for (j = i + 1; j < n; j++) {
      if (arr[j] > minm) {
        flag = 1;
        pos = j;
        break;
      } else if (arr[j] < minm) {
        minm = arr[j];
        purindex = j;
      }
    }
    if (flag == 0) break;
    pur = amount / arr[purindex];
    amount -= arr[purindex] * pur;
    amount += arr[pos] * pur;
    i += pos;
  }
  cout << amount;
  return 0;
}
