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