#include <bits/stdc++.h>
using namespace std;
int MAX = 80;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  int a[MAX];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long money = 1000;
  int start = 0, stocks;
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i])
      continue;
    else {
      stocks = money / a[start];
      money = (money - (stocks * a[start])) + (stocks * a[i]);
      start = i + 1;
    }
  }
  if (start != n - 1) {
    stocks = money / a[start];
    money = (money - (stocks * a[start])) + (stocks * a[n - 1]);
  }
  cout << money;
  return 0;
}
