#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long gcd(long long a, long long b) { return (!b ? a : gcd(b, a % b)); }
const long long mod = 1e9 + 7;
const int INF32 = 1 << 30;
const long long INF64 = 1LL << 60;
const long double pi = 3.141592653589793;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  int money = 1000;
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> temp;
  int now = a[0];
  for (int j = 0; j < n; j++) {
    if (a[j] > now) {
      temp.push_back(now);
      temp.push_back(a[j]);
      now = a[j];
    } else if (a[j] < now) {
      now = a[j];
    }
  }
  int t = temp.size();
  for (int i = 0; i < t - 1; i = i + 2) {
    int hi = money / temp[i];
    money = hi * temp[i + 1] + money % temp[i];
  }
  cout << money;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
