#include <bits/stdc++.h>
using namespace std;
const int nax = 1e9 + 7;
const int mod = 1e9 + 7;
const int inf = (1 << 30);
const long double PI = 3.1415926535897932384626433832795;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int money = 1000;
  int stock = 0;
  int ans = 1000;
  int index = 1;
  while (index < n) {
    while (index < n && a[index - 1] >= a[index]) ++index;
    stock = money / a[index - 1];
    money -= stock * a[index - 1];
    while (index < n && a[index - 1] < a[index]) ++index;
    money += stock * a[index - 1];
    stock = 0;
    ans = max(ans, money);
  }
  if (a[n - 2] > a[n - 1]) {
    money += stock * a[n - 1];
    ans = max(ans, money);
  }
  cout << ans;
}
