#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long mn = INT_MAX;
  long long money = 1000;
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (mn >= v[i]) {
      mn = v[i];
    } else {
      cnt = money / mn;
      money = (money % mn) + (cnt * v[i]);
      mn = INT_MAX;
    }
  }
  cout << money << endl;
  return 0;
}
