#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;
  int last = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (!flag) {
      last = i;
      flag = 1;
    } else {
      if (a[i] > a[last]) {
        st = (tmp / a[last]);
        tmp -= st * a[last];
        tmp += st * a[i];
        st = 0;
        flag = false;
      } else if (a[i] < a[last]) {
        last = i;
      }
    }
  }
  cout << tmp << '\n';
}
