#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long ans = 1000;
  vector<int> ar(n, 0);
  for (int i = 0; i < n; i++) cin >> ar[i];
  long long min = ar[0], max = ar[0];
  for (int i = 1; i < n; i++) {
    if (ar[i] < max) {
      long long st = floor((float)ans / min);
      ans -= st * min;
      ans += st * max;
      min = ar[i];
      max = ar[i];
    } else if (ar[i] > max) {
      max = ar[i];
    }
  }
  if (max > min) {
    long long st = floor((float)ans / min);
    ans -= st * min;
    ans += st * max;
  }
  cout << ans << '\n';
}
