#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long inf = 1e18;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  long long ans = 1000;
  for (int i = 1; i < n; ++i) {
    if (a[i] >= a[i - 1]) {
      int tmp = ans / a[i - 1];
      ans %= a[i - 1];
      ans += (long long)tmp * a[i];
    }
  }
  cout << ans;
  return 0;
}
