#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int cash = 1000, stock = 0;
  for (int i = 0; i < n; i++) {
    if (i == n - 1 or a[i] >= a[i + 1]) {
      cash += stock * a[i];
      stock = 0;
    } else {
      int ext = cash / a[i];
      stock += ext;
      cash -= ext * a[i];
    }
  }
  cout << cash;
  return 0;
}
