#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 2e9;
const double PI = acos(-1);
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  int ans = 1000;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      int j = ans / a[i];
      ans += (a[i + 1] - a[i]) * j;
    }
  }
  cout << ans << endl;
  return 0;
}
