#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<int> dp(N, 1000);
  for (int i = 0; i < N - 1; i++) {
    int a = dp[i] / A[i];
    int b = dp[i] % A[i];
    int x = 0;
    for (int j = i + 1; j < N; j++) {
      x = max(x, a * A[j] + b);
      dp[j] = max(dp[j], x);
    }
  }
  cout << dp[N - 1] << endl;
}
