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