#include <bits/stdc++.h>
using namespace std;
bool _predicate(int a, const int& element) { return (element == a); }
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<long long>> money(n + 1, vector<long long>(2, 0));
  vector<vector<long long>> dp(n + 1, vector<long long>(2, 0));
  money[0][0] = 1000;
  for (int i = 0; i < n; i++) {
    money[i + 1][0] = max(money[i][0], money[i][1] + dp[i][1] * a[i]);
    dp[i + 1][0] = 0;
    if (dp[i][1] > money[i][0] / a[i]) {
      dp[i + 1][1] = dp[i][1];
      money[i + 1][1] = money[i + 1][1];
    } else {
      dp[i + 1][1] = money[i][0] / a[i];
      money[i + 1][1] = money[i][0] % a[i];
    }
  }
  cout << money[n][0] << endl;
}
