#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int n;
long long int chhoti(int idx, long long int val) {
  for (int i = idx; i <= n; i++) {
    if (arr[i] <= val) {
      val = arr[i];
    } else
      return i - 1;
  }
  return n;
}
long long int badi(int idx, long long int val) {
  for (int i = idx; i <= n; i++) {
    if (arr[i] >= val)
      val = arr[i];
    else
      return i - 1;
  }
  return n;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  int a = 0;
  long long int sum = 1000;
  long long int s = 0;
  long long int ans = 1000;
  for (int i = 1; i <= n; i++) {
    if (a == 0) {
      int j = chhoti(i, arr[i]);
      int st = (sum / arr[i]);
      s += st;
      sum -= (st * arr[i]);
      i = j;
    } else {
      int j = badi(i, arr[i]);
      sum += (s * arr[i]);
      ans = max(ans, sum);
      s = 0;
      i = j;
    }
    a ^= 1;
  }
  cout << ans << '\n';
}
