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