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