#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
int arr[2000005];
int main() {
  int flag;
  deque<int> s;
  int n, k, sum, num, love;
  sum = 1000;
  num = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  for (int i = 1; i <= n; i++) {
    love = 0;
    flag = 0;
    for (int j = i + 1; j <= n; j++) {
      if (arr[j] > arr[i]) {
        flag = 1;
        break;
      }
      if (arr[j] < arr[i]) {
        love = 1;
        break;
      }
    }
    if (sum >= arr[i] && flag == 1) {
      num = sum / arr[i];
      sum = sum - arr[i] * num;
    } else if (num > 0 && love == 1 || (num > 0 && i == n)) {
      sum = sum + num * arr[i];
      num = 0;
    }
  }
  printf("%d\n", sum);
}
