#include <bits/stdc++.h>
using namespace std;
const char en = '\n';
constexpr long long INF = 1000000000;
constexpr long long MOD = 1000000007;
void add_edge(vector<vector<long long>>& g, long long from, long long to,
              bool isDirected) {
  g[from].push_back(to);
  if (!isDirected) g[to].push_back(from);
}
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 n;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int kabu = 0, money = 1000;
  for (int i = 0; i < (n - 1); ++i) {
    if (a[i] >= a[i + 1]) {
      money += kabu * a[i];
      kabu = 0;
    } else if (a[i] < a[i + 1]) {
      kabu += money / a[i];
      money = money % a[i];
    }
  }
  cout << money + a[n - 1] * kabu << endl;
}
