#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  vector<int> v(n);
  vector<int> d(n - 1);
  for (auto& el : v) cin >> el;
  int money = 1000;
  int stocks = 0;
  for (int i = 0; i + 1 < n; ++i) {
    d[i] = v[i + 1] - v[i];
  }
  for (int i = 0; i + 1 < n; ++i) {
    if (d[i] > 0) {
      int st = money / v[i];
      money += st * d[i];
    }
  }
  cout << money << "\n";
  return 0;
}
