#include <bits/stdc++.h>
using namespace std;
int a[100];
int main() {
  int n;
  cin >> n;
  int tn = 0;
  a[0] = 201;
  for (int i = 1; i <= n; ++i) {
    cin >> a[++tn];
    if (a[tn - 1] == a[tn]) --tn;
  }
  int sum = 1000, cnt = 0, ans = 1000;
  for (int i = 1; i <= tn; ++i) {
    if (a[i - 1] > a[i] && a[i] < a[i + 1]) {
      cnt += sum / a[i];
      sum %= a[i];
    }
    if (a[i - 1] < a[i] && a[i] > a[i + 1]) {
      sum += cnt * a[i];
      cnt = 0;
    }
    ans = max(ans, sum);
  }
  cout << ans << endl;
  return 0;
}
