#include <bits/stdc++.h>
using ll = long long;
using namespace std;
void solve() {}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    a[i] = m;
  }
  int ans = 0;
  int money = 1000;
  int kabu = 0;
  vector<int> w(n);
  for (int j = 0; j < n - 1; j++) {
    if (a[j] > a[j + 1]) {
      money += kabu * a[j];
      kabu = 0;
    } else if (a[j + 1] == a[j]) {
      continue;
    } else {
      kabu = money / a[j];
      money -= a[j] * kabu;
    }
    w[j] = money + kabu * a[j];
  }
  money += kabu * a[n - 1];
  kabu = 0;
  w[n - 1] = money;
  for (int i = 0; i < n; i++) {
    ans = max(ans, w[i]);
  }
  cout << ans << endl;
  return 0;
}
