#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-3;
const double PI = 3.1415926535897932384626433832795028841971;
const int IINF = 1 << 30;
const long long INF = 1ll << 60;
const long long MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    cin >> v[i];
  }
  int ans = 1000;
  int stock = 0;
  for (long long i = (long long)(0); i < (long long)(n - 1); ++i) {
    ans += stock * v[i];
    stock = 0;
    if (v[i] < v[i + 1]) {
      stock = ans / v[i];
      ans %= v[i];
    }
  }
  ans += stock * v[n - 1];
  cout << ans << endl;
  return 0;
}
