#include <bits/stdc++.h>
using namespace std;
const int MAX = 100;
int N, a[MAX], pd[MAX];
int main(int argc, char** argv) {
  int N;
  scanf("%d", &N);
  for (int i = (1); i <= (N); i++) scanf("%d", a + i);
  pd[0] = 1000;
  for (int i = (1); i <= (N); i++) {
    pd[i] = max(pd[i], pd[i - 1]);
    int k = pd[i] / a[i];
    int m = pd[i] % a[i];
    for (int j = (i + 1); j <= (N); j++) pd[j] = max(pd[j], k * a[j] + m);
  }
  printf("%d\n", pd[N]);
  return 0;
}
