#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
int dp[100];
int main() {
  int N;
  cin >> N;
  int a[N + 1];
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
  }
  dp[0] = 1000;
  for (int i = 0; i < N; i++) {
    dp[i + 1] = dp[i];
    for (int j = i + 1; j <= N; j++) {
      if (a[i] == 0 || (a[j] - a[i] < 0)) continue;
      int s = dp[i] / a[i];
      dp[j] = max(dp[j], dp[i] + s * (a[j] - a[i]));
    }
  }
  cout << dp[N] << endl;
}
