#include <bits/stdc++.h>
using namespace std;
int n, k;
vector<long long> a;
void input();
bool buy[100];
void solve() {
  long long mx = 0;
  memset(buy, false, sizeof(buy));
  long long money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      long long stock = money / a[i];
      money %= a[i];
      money += stock * a[i + 1];
      i++;
    }
  }
  cout << money << "\n";
}
void Clear() {}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  input();
  solve();
  Clear();
}
void input() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.push_back(x);
  }
}
