#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
signed main() {
  4;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int tc = 1;
  int n;
  cin >> n;
  int a[n];
  int money = 1000;
  cin >> a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    if (a[i] > a[i - 1]) {
      int stocks = (money / a[i - 1]);
      money -= (a[i - 1] * stocks);
      money += (a[i] * stocks);
    }
    4;
  }
  cout << money << "\n";
  return 0;
}
