#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  long long ans = 0;
  long long tmp = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      long long cnt = 0;
      while (tmp >= a[i]) {
        tmp -= a[i];
        cnt++;
      }
      tmp += cnt * a[i + 1];
    }
  }
  cout << tmp << endl;
}
