#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int U = 2e5 + 5;
const ll MOD = 1000000007;
const int INF = 1001001001;
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 1);
  A[N] = 0;
  int i;
  ll ans = 1000;
  ll anss = ans;
  int x = 0;
  for (i = 0; i < N; i++) cin >> A[i];
  for (i = 0; i < N; i++) {
    if (A[i] < A[i + 1]) {
      x = ans / A[i];
      ans = ans + (A[i + 1] - A[i]) * x;
    }
  }
  cout << ans << endl;
  ;
  return 0;
}
