#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  int n, ans = 1000;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i)
      if (a[i] > a[i - 1]) {
        ans = ans / a[i - 1] * a[i];
        ans += a[i] % a[i - 1];
      }
  }
  cout << ans;
  return 0;
}
