#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
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 (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class S, class T>
ostream& operator<<(ostream& os, const pair<S, T> v) {
  os << "(" << v.first << ", " << v.second << ")";
  return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T> v) {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i > 0) {
      os << " ";
    }
    os << v[i];
  }
  return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<vector<T>> v) {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i > 0) {
      os << endl;
    }
    os << v[i];
  }
  return os;
}
template <typename T>
void debug(vector<vector<T>>& v, long long h, long long w) {
  for (long long i = 0; i < h; i++) {
    cerr << v[i][0];
    for (long long j = 1; j < w; j++) cerr << " " << v[i][j];
    cerr << endl;
  }
};
template <typename T>
void debug(vector<T>& v, long long n) {
  if (n != 0) cerr << v[0];
  for (long long i = 1; i < n; i++) cerr << " " << v[i];
  cerr << endl;
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < (long long)N; i++) cin >> A[i];
  long long M = 1000;
  for (long long i = 0; i < (long long)N; i++) {
    int j = i;
    while (j < N - 1 and A[j] < A[j + 1]) {
      j++;
    }
    long long kau = M / A[i];
    M += kau * (A[j] - A[i]);
    j = i;
  }
  cout << M << endl;
  return 0;
}
