#include <bits/stdc++.h>
using namespace std;
int main(void) {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  };
  long long int n, i;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  long long int sum = 1000, stocks = 0;
  for (i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i]) stocks = sum / a[i];
    sum += (a[i + 1] - a[i]) * stocks;
  }
  cout << sum;
}
