#include <bits/stdc++.h>
using namespace std;
int a[100];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int mon = 1000, i = 0, ans = 1000;
  while (i < n - 1) {
    while ((i < n - 1) && (a[i + 1] <= a[i])) i++;
    if (i == n - 1) break;
    int stocks = mon / a[i];
    int buy = i++;
    while ((i < n) && (stocks * a[i] >= stocks * a[i - 1])) i++;
    int sell = i - 1;
    mon += stocks * (a[sell] - a[buy]);
    ans = max(ans, mon);
  }
  cout << mon;
  return 0;
}
