#include <bits/stdc++.h>
using namespace std;
using P = pair<long long, long long>;
signed main(void) {
  int n, money, now, tmp, rate, ans;
  cin >> n;
  int a[n];
  bool sell = false;
  for (int i = 0; i < (n); i++) cin >> a[i];
  money = 1000;
  ans = money;
  now = 0;
  rate = 210;
  int i = 0;
  while (i < n) {
    if (sell && rate < a[i]) {
      tmp = a[i];
      while (tmp < a[i + 1] && i < n) {
        tmp = a[i];
        i++;
      }
      money += now * tmp;
      rate = tmp;
      ans = max(ans, money);
      sell = false;
    } else if (!sell && rate > a[i]) {
      tmp = a[i];
      while (tmp > a[i + 1] && i < n) {
        tmp = a[i];
        i++;
      }
      now = money / tmp;
      money %= tmp;
      rate = tmp;
      sell = true;
    } else
      i++;
  }
  cout << ans << endl;
  return 0;
}
