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