#include <bits/stdc++.h>
int main() {
  int n, a[81] = {0}, c[80];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) {
    if (a[i] < a[i + 1])
      c[i] = 1;
    else if (a[i] == a[i + 1])
      c[i] = 0;
    else
      c[i] = -1;
  }
  int r = 0, st = 0, mon = 1000;
  int buy = 1;
  for (int i = 0; i < n; i++) {
    if (buy == 1) {
      if (c[i] != 1)
        continue;
      else {
        st = mon / a[i];
        mon -= st * a[i];
        buy = 0;
      }
    } else {
      if (c[i] != -1)
        continue;
      else {
        mon += st * a[i];
        st = 0;
        buy = 1;
      }
    }
  }
  printf("%d", mon);
  return 0;
}
