#include <bits/stdc++.h>
using pii = std::pair<long long, long long>;
using namespace std;
const long long maxn = 85;
long long n, a[maxn];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long money = 1000, stocks = 0;
  for (long long i = 0; i < n; i++) {
    if (i < n - 1 && a[i] < a[i + 1]) {
      stocks = money / a[i];
      money %= a[i];
    } else {
      money += stocks * a[i];
      stocks = 0;
    }
  }
  cout << money << "\n";
  return 0;
}
