#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 = 1000;
    for (int i = 0; i <= n - 1; i++) {
      cin >> a[i];
    }
    int money = 1000;
    for (int i = 0; i <= n - 2; i++) {
      int stocks = 0;
      if (a[i + 1] > a[i]) stocks = money / a[i];
      money += (a[i + 1] - a[i]) * stocks;
    }
    cout << money;
    cout << "\n";
  }
  return 0;
}
