#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long ans = 1000, stock = 0;
  for (int i = 0; i < n; i++) {
    if (stock == 0) {
      for (int j = i + 1; j < n; j++) {
        if (a[j] > a[i]) {
          stock += ans / a[i];
          ans -= (ans / a[i]) * a[i];
        }
      }
    } else {
      for (int j = i + 1; j < n; j++) {
        if (a[j] < a[i]) {
          ans += stock * a[i];
          stock = 0;
        }
      }
      if (stock && i == (n - 1)) ans += stock * a[i];
    }
  }
  cout << ans;
  return 0;
}
