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