#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  int kabu = 0;
  int money = 1000;
  int up_down = -1;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a[i] < a[i + 1]) {
      if (up_down != 0) {
        kabu = money / a[i];
        money %= a[i];
      }
      up_down = 0;
    } else if (a[i] > a[i + 1]) {
      if (up_down != 2) {
        money += kabu * a[i];
        kabu = 0;
      }
      up_down = 2;
    }
  }
  money += a[n - 1] * kabu;
  cout << money << endl;
  return 0;
}
