#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;
signed main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  int ans = 1000;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i] >= a[i + 1]) continue;
    int t = ans / a[i];
    ans -= a[i] * (ans / a[i]);
    ans += t * a[i + 1];
  }
  cout << ans << endl;
  return 0;
}
