#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int arr[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  int ans = 1000;
  int c;
  int d = 0;
  for (int i = 0; i < n - 1; i++) {
    if (arr[i] > arr[i + 1]) {
      if (d != 0) {
        ans = c + d * arr[i];
        d = 0;
      }
      continue;
    } else if (arr[i] <= arr[i + 1]) {
      int k = ans / arr[i];
      d = max(d, k);
      if (d == k) {
        c = ans - d * arr[i];
        ans = c + d * arr[i + 1];
      }
      if (i == n - 2) {
        ans = c + d * arr[i + 1];
        break;
      }
    }
  }
  printf("%d\n", ans);
}
