#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  long long int n;
  cin >> n;
  ;
  std::vector<int> v;
  for (int i = 0; i < n; ++i) {
    long long int ni;
    cin >> ni;
    ;
    v.push_back(ni);
  }
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < n - 1; ++i) {
    if (v[i + 1] > v[i]) {
      stock += money / v[i];
      money = money % v[i];
    } else if (v[i + 1] < v[i]) {
      money += stock * v[i];
      stock = 0;
    }
  }
  money += stock * v[n - 1];
  stock = 0;
  cout << money << endl;
  return 0;
}
