#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long thaka = 1000;
  for (int i = 0; i < n - 1; i++) {
    long long bundle = 0;
    if (a[i] < a[i + 1]) {
      bundle = thaka / a[i];
      thaka = thaka % a[i];
      thaka += (bundle * a[i + 1]);
      i++;
    }
  }
  cout << thaka << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
