#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, k;
    cin >> n;
    int arr[n + 1];
    for (int i = 1; i <= n; i++) cin >> arr[i];
    int profit = (1000 % arr[1]);
    int st = 1000 / arr[1];
    for (int i = 2; i <= n; i++) {
      if (arr[i] > arr[i - 1]) {
        profit += (st * arr[i]);
        st = profit / arr[i];
        profit = profit % arr[i];
      } else {
        profit += st * arr[i - 1];
        st = profit / arr[i];
        profit = profit % arr[i];
      }
    }
    profit += st * arr[n];
    cout << profit << endl;
  }
}
