#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int M = 2e3 + 5;
int n, k, arr[M], dp[M] = {0};
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", arr + i);
  }
  dp[0] = 1;
  for (int i = 1; i < n; i++) {
    dp[i] = 1;
    if (arr[i - 1] <= arr[i]) {
      dp[i] += dp[i - 1];
      dp[i - 1] = 0;
    }
  }
  int ans = 1000;
  for (int i = 1; i < n; i++) {
    if (dp[i]) {
      int num = ans / arr[i - dp[i] + 1];
      ans -= num * arr[i - dp[i] + 1];
      ans += num * arr[i];
    }
  }
  printf("%d", ans);
  return 0;
}
