#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int i;
  int a[201];
  int mark[201];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 2; i < n; i++) {
    if (a[i - 2] < a[i - 1] && a[i - 1] >= a[i])
      mark[i - 1] = 1;
    else if (a[i - 2] > a[i - 1] && a[i - 1] <= a[i])
      mark[i - 1] = 2;
    else
      mark[i - 1] = 0;
  }
  if (a[0] < a[1]) mark[0] = 2;
  if (a[n - 2] < a[n - 1]) mark[n - 1] = 1;
  int cash = 1000;
  int stock = 0;
  for (i = 0; i < n; i++) {
    if (mark[i] == 2) {
      int num = cash / a[i];
      cash -= num * a[i];
      stock += num;
    } else if (mark[i] == 1) {
      cash += stock * a[i];
      stock = 0;
    }
  }
  printf("%d\n", cash);
  return 0;
}
