#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  int amount = 1000, stocks = 0, first = -1, second = -1;
  int i = 0;
  while (i < n) {
    if (i == n - 1 && first == -1) break;
    if (i == n - 1 && first != -1) {
      second = i;
      stocks = amount / a[first];
      amount = amount % a[first] + stocks * (a[second]);
      break;
    }
    if (a[i] < a[i + 1] && first == -1) {
      first = i;
      i++;
      continue;
    }
    if (a[i] > a[i + 1] && first != -1) {
      second = i;
      stocks = amount / a[first];
      amount = amount % a[first] + stocks * (a[second]);
      first = -1;
    }
    i++;
  }
  cout << amount;
  return 0;
}
