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