#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int a[100];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int nums = 0;
  int nSum = 1000;
  int nMin;
  for (int i = 0; i < n; i++) {
    nMin = a[i];
    for (int j = i + 1; j < n; j++) {
      if (a[i] >= a[j]) {
        nMin = a[j];
      } else {
        nums = nSum / nMin;
        nSum = nSum % nMin;
        nSum += nums * a[j];
        i = j;
        break;
      }
    }
  }
  printf("%d\n", nSum);
  return 0;
}
