#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long ans = 1000;
  long long kabu = 0;
  for (long long i = 0; i < n - 1; ++i) {
    if (a[i] < a[i + 1]) {
      kabu = ans / a[i];
      ans -= ans / a[i] * a[i];
      continue;
    }
    if (a[i] > a[i + 1] && kabu > 0) {
      ans += kabu * a[i];
      kabu = 0;
      continue;
    }
  }
  if (kabu > 0) {
    ans += kabu * a[n - 1];
  }
  cout << ans << endl;
}
