#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 1000, kabu = 0, lastup = 0;
  cin >> n;
  vector<int> price(n);
  vector<int> updown(n);
  for (int i = 0; i < n; i++) {
    cin >> price[i];
    if (i != 0) {
      if (price[i - 1] < price[i]) {
        updown[i] = 1;
        lastup = i;
      }
    }
  }
  if (lastup == 0) {
    cout << ans << endl;
    return 0;
  } else {
    kabu = ans / price[0];
    ans = ans - price[0] * kabu;
  }
  for (int i = 1; i <= lastup; i++) {
    if (price[i - 1] > price[i]) {
      kabu = ans / price[i];
      ans = ans - price[i] * kabu;
    } else if (price[i - 1] < price[i]) {
      ans += kabu * price[i];
    }
  }
  cout << ans << endl;
  return 0;
}
