#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int x = 1000;
  int s = 0;
  int i = 0;
  while (1) {
    while (i < n - 1 && a[i] >= a[i + 1]) i++;
    if (i == n - 1) break;
    s = x / a[i];
    x = x % a[i];
    while (i < n - 1 && a[i] <= a[i + 1]) i++;
    x = x + s * a[i];
    s = 0;
  }
  cout << x << endl;
}
