#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; ++i) cin >> A[i];
  int ans = 1000, tmp = 0;
  for (int i = 0; i < n - 1; ++i) {
    tmp = 0;
    if (A[i] < A[i + 1]) tmp = ans / A[i];
    ans += (A[i + 1] - A[i]) * tmp;
  }
  cout << ans << endl;
}
