#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);
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(void) {
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)n; ++i) {
    cin >> a[i];
  }
  vector<pair<int, int>> pred;
  int max, min = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] < a[i - 1]) {
      max = i - 1;
      pred.push_back(make_pair(min, max));
      min = i;
    }
  }
  pred.push_back(make_pair(min, n - 1));
  int wal = 1000;
  for (auto x : pred) {
    int buy = wal / a[x.first];
    wal %= a[x.first];
    wal += a[x.second] * buy;
  }
  cout << wal << endl;
  return 0;
}
