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