#include <bits/stdc++.h>
using namespace std;
const int N = 3e6 + 7, M = 1000000007, inf = INT_MAX;
const long long INF = LLONG_MAX;
int arr[82], n;
void solve() {
  cin >> n;
  for (int i = 0; i < (int)n; i++) cin >> arr[i];
  int i = 0, total = 0, ans = 0, initial = 1000;
  while (i < n) {
    int j = i;
    while (j < n - 1 and arr[j] <= arr[j + 1]) j++;
    int cash = initial;
    int total = cash / arr[i];
    cash -= total * arr[i];
    cash += arr[j] * total;
    initial = max(initial, cash);
    ans = max(cash, ans);
    i = j + 1;
  }
  cout << ans << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int test = 1;
  while (test--) solve();
}
