#include <bits/stdc++.h>
using namespace std;
const int N = 105, mod = 1e9 + 7;
int a[N];
int main() {
  int n, s = 1000;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int k = 1, i = 1;
  while (i <= n && k <= n) {
    while (i < n && a[i] <= a[i + 1]) i++;
    s += (a[i] - a[k]) * (s / a[k]);
    k = i + 1;
    while (k < n && a[k] >= a[k + 1]) k++;
    i = k;
  }
  printf("%d\n", s);
  return 0;
}
