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