#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)(1e9 + 7);
const int N = (int)(1e6 + 5);
void pre() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  int n, k = 1000;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int stocks = 0, price = 200;
  for (int i = 0; i < (n); i++) {
    if (i == 0) {
      stocks = k / a[i];
      k = k - stocks * a[i];
      continue;
    }
    if (a[i] >= a[i - 1]) {
      k = k + stocks * a[i];
      stocks = k / a[i];
      k = k - stocks * a[i];
    } else {
      k = k + stocks * a[i - 1];
      stocks = k / a[i];
      k = k - stocks * a[i];
    }
  }
  k = k + stocks * a[n - 1];
  cout << k;
}
int main() {
  pre();
  int t = 1;
  for (int i = 0; i < (t); i++) {
    solve();
    cout << '\n';
  }
  return 0;
}
