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