#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int& u : a) {
    cin >> u;
  }
  int L = 0;
  int money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      money = money / a[L] * a[i] + money % a[L];
      L = i + 1;
    }
  }
  money = money / a[L] * a[n - 1] + money % a[L];
  cout << money << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
