#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
void d_err() { cerr << endl; }
template <typename H, typename... T>
void d_err(H h, T... t) {
  cerr << h << " ";
  d_err(t...);
}
template <typename T>
void print(T x) {
  cout << x << endl;
}
long long INF = 1e16;
int inf = 1e9;
long long MOD = 1e9 + 7;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (0); i < (N); ++i) cin >> A[i];
  bool f = false;
  vector<int> v(N, 0);
  for (int i = (0); i < (N - 1); ++i) {
    if (A[i] > A[i + 1]) {
      v[i] = 1;
    } else if (A[i] < A[i + 1]) {
      v[i] = 2;
    }
  }
  v[N - 1] = 1;
  int stock = 0;
  int ans = 1000;
  f = false;
  for (int i = (0); i < (N); ++i) {
    int c = ans / A[i];
    if (v[i] == 2) {
      stock += c;
      ans -= c * A[i];
      f = true;
    } else if (v[i] == 1) {
      ans += A[i] * stock;
      stock = 0;
      f = false;
    } else {
      if (f) {
        stock += c;
        ans -= c * A[i];
      }
    }
  }
  print(ans);
}
