#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
static const long long MOD = 1000000007;
static const long long LINF = (long long)(1e18 + 99);
static const int INF = 1e9 + 99;
int dp[85];
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N + 1);
  for (int i = (1); i < (N + 1); i++) cin >> A[i];
  dp[0] = 1000;
  for (int i = (1); i < (N + 1); i++) {
    int mx = dp[i - 1];
    for (int j = (1); j < (i); j++) {
      int money = dp[j];
      int c = money / A[j];
      money += (A[i] - A[j]) * c;
      mx = max(mx, money);
    }
    dp[i] = mx;
  }
  cout << dp[N] << "\n";
  return 0;
}
