#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
ll a[100];
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  for (int(i) = 0; (i) < (n); (i)++) cin >> a[i];
  ll tmp = 1000;
  ll st = 0;
  bool flag = false;
  ll mn, mx, mni = 0, mxi = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (!flag) {
      mn = a[i];
      mx = a[i];
      mxi = mni = i;
      flag = true;
    } else {
      if (a[i] > mx) {
        st = (tmp / a[mni]);
        tmp -= a[mni] * st;
        tmp += st * a[i];
        st = 0;
        flag = false;
      } else if (a[i] < mn) {
        mn = a[i];
        mni = i;
      }
    }
  }
  cout << tmp << '\n';
}
