#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  long long money = 1000;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 2; i++) {
    long long stocks = 0;
    if (a[i] < a[i + 1]) stocks = money / a[i];
    money += (a[i + 1] - a[i]) * stocks;
  }
  cout << money << endl;
}
