#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[81];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int dp[81];
  dp[0] = 1000;
  for (int i = 1; i < n; i++) {
    dp[i] = dp[i - 1];
    for (int j = 0; j < i; j++) {
      if (a[i] * (dp[j] / a[j]) + (dp[j] - a[j] * (dp[j] / a[j])) > dp[i]) {
        dp[i] = a[i] * (dp[j] / a[j]) + dp[j] - a[j] * (dp[j] / a[j]);
      }
    }
  }
  cout << dp[n - 1] << endl;
  return 0;
}
