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