#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T = 1;
  while (T--) {
    int n;
    cin >> n;
    int a[n], mx = 0;
    for (int i = 0; i <= n - 1; i++) {
      cin >> a[i];
    }
    int money = 1000;
    int j = 0;
    for (int i = 0; i <= n - 2; i++) {
      if (a[i + 1] <= a[i]) {
        long long int stocks = money / a[j];
        money = (money - (stocks * a[j])) + stocks * a[i];
        j = i + 1;
      }
    }
    if (j != n - 1) {
      long long int stocks = money / a[j];
      money = (money - (stocks * a[j])) + (stocks * a[n - 1]);
    }
    cout << money;
  }
  return 0;
}
