#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T x) {
  std::cout << x << " ";
}
template <typename T>
void println(T x) {
  std::cout << x << "\n";
}
signed main(void) {
  long long n;
  cin >> n;
  vector<long long> a(n + 1);
  for (long long i = 1; i < (n + 1); i++) {
    cin >> a[i];
  }
  long long dp[81];
  dp[1] = 1000;
  for (long long i = (2); i < (n + 1); i++) {
    dp[i] = dp[i - 1];
    for (long long j = 1; j < (i); j++) {
      dp[i] = max(dp[i], (dp[j] + (a[i] - a[j]) * dp[j] / a[j]));
    }
  }
  cout << dp[n] << endl;
}
