#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int money = 1000;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 1; i < n; i++) {
    if (v[i - 1] < v[i]) {
      int stock = money / v[i - 1];
      money -= money / v[i - 1] * v[i - 1];
      money += stock * v[i];
    }
  }
  cout << money << '\n';
  return 0;
}
