#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename K, typename V>
using umap = unordered_map<K, V>;
template <typename V>
using uset = unordered_set<V>;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
bool range_validation(int y, int x, int h, int w) {
  return y >= 0 && y < h && x >= 0 && x < w;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int money = 1000;
  int stock = 0;
  int idx = 0;
  int now;
  while (idx < n) {
    now = a[idx];
    int idx2 = idx + 1;
    while (idx2 < n && a[idx2] >= now) {
      now = a[idx2];
      idx2++;
    }
    if (idx2 < n || a[idx2 - 1] > a[idx]) {
      stock += money / a[idx];
      money = money - stock * a[idx];
      money += stock * a[idx2 - 1];
      stock = 0;
    } else {
      break;
    }
    idx = idx2;
  }
  cout << money << endl;
  return 0;
}
