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