#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int money = 1000, kabu = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      int t = money / a[i];
      kabu += t;
      money -= t * a[i];
    } else if (a[i] > a[i + 1]) {
      money += kabu * a[i];
      kabu = 0;
    } else
      continue;
  }
  money += kabu * a[n - 1];
  cout << (max(1000, money)) << "\n";
}
