#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1LL << 60;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int total = 1000;
  int num = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (num == 0 && a[i] < a[i + 1]) {
      num = total / a[i];
      total = total - a[i] * num;
    } else if (num != 0 && a[i] > a[i + 1]) {
      total = total + a[i] * num;
      num = 0;
    } else
      continue;
  }
  if (num != 0) {
    total = total + a[n - 1] * num;
  }
  cout << total << endl;
  return 0;
}
