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