#include <bits/stdc++.h>
using namespace std;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int INF = 0x3f3f3f3f;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const unsigned long long P = 131;
const int N = 2e5 + 7;
int a[N];
int main() {
  int n, t;
  cin >> n;
  int ans = 1000;
  for (int k = 1; k <= n; k++) cin >> a[k];
  int i = 1, j = 2;
  while (j <= n) {
    while (a[j] <= a[i] && j <= n) j++;
    if (j > n) break;
    ans = ans / a[i] * a[j] + ans % a[i];
    while (j + 1 <= n && a[j + 1] == a[j]) j++;
    if (j > n) break;
    j++, i = j;
  }
  cout << ans << "\n";
  return 0;
}
