#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 j = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] <= a[i + 1]) {
      j = i;
      mn = a[j];
      while (j < n - 1 && a[j] <= a[j + 1]) {
        j++;
      }
      mx = a[j];
      int stocks = money / mn;
      money -= stocks * mn;
      money += stocks * mx;
      i = j;
    }
  }
  cout << money;
}
