#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
const long long int INF = 1e9 + 3;
const long long int MAX_N = 1e6 + 2;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  int shares = 0, amount = 1000, i, j, mul, mx;
  for (i = 0; i < n; ++i) {
    if (v[i] < v[i + 1]) {
      mul = amount / v[i];
      shares += mul;
      amount -= (mul * v[i]);
      amount += shares * (v[i + 1]);
      shares = 0;
    }
  }
  cout << amount;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) solve();
}
