#include <bits/stdc++.h>
using namespace std;
const long long MAX = 200002;
const long long MOD = 1000000007;
signed main() {
  long long n;
  cin >> n;
  long long a[n], k = 1000;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long t = 0;
  if (a[0] < a[1])
    for (long long i = 0; i < n; i++) {
      if (a[i] < a[i + 1]) {
        t += k / a[i];
        k %= a[i];
      }
      if (a[i] > a[i + 1]) {
        k += t * a[i];
        t = 0;
      }
    }
  cout << k + t * a[n - 1] << endl;
}
