#include <bits/stdc++.h>
using namespace std;
int n;
int a[100];
int cnt = 1000;
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i < n; i++)
    if (a[i] < a[i + 1]) cnt += (a[i + 1] - a[i]) * (cnt / a[i]);
  cout << cnt << endl;
  return 0;
}
