#include <bits/stdc++.h>
const int INF = 1e6;
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uld = unsigned long long;
using P = pair<int, int>;
const ll mod = 1e9 + 7;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
template <class T>
inline bool chmax(T& a, T& b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <class T>
inline bool chmin(T& a, T& b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
int main() {
  int money = 1e3, n;
  cin >> n;
  int num[n];
  for (int i = 0; i < n; i++) {
    cin >> num[i];
  }
  for (int i = 0; i < n - 1; i++) {
    if (num[i] < num[i + 1]) {
      money = (money / num[i]) * num[i + 1] + (money % num[i]);
    }
  }
  cout << money << endl;
}
