#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long INF = 1LL << 60;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int money = 1000;
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> dp(n);
  dp[0] = 1000;
  dp[1] = 1000;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; j < i; j++) {
      dp[i] =
          max((dp[j] / a[j]) * a[i] + dp[j] - (dp[j] / a[j]) * a[j], dp[i - 1]);
    }
  }
  cout << dp[n - 1] << endl;
}
