#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];
    int nSumTmp = nSum;
    int nNumTmp = 0;
    int nIndex = i;
    for (int j = i + 1; j < n; j++) {
      if (a[i] >= a[j]) {
        nMin = a[j];
        int nNums = nSum / nMin;
        int nSumans = nSum % nMin;
        nSumans += nNums * a[j];
        if (nSumTmp < nSumans) {
          nSumTmp = nSumans;
          nIndex = j;
        }
      } else {
        int nNums = nSum / nMin;
        int nSumans = nSum % nMin;
        nSumans += nNums * a[j];
        if (nSumTmp < nSumans) {
          nSumTmp = nSumans;
          nIndex = j;
        }
        break;
      }
    }
    nSum = nSumTmp;
    i = nIndex;
  }
  printf("%d\n", nSum);
  return 0;
}
