#include <bits/stdc++.h>
using namespace std;
const int mn = 100;
int n, a[mn], ans = 1000;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i);
  int s = 1, t = 1, las = a[1];
  for (int i = 2; i <= n; ++i) {
    if (a[i] >= las)
      t = i, las = a[i];
    else {
      ans = ans % a[s] + (ans / a[s]) * a[t];
      s = t = i + 1;
      las = a[i + 1];
    }
  }
  if (t == n) ans = ans % a[s] + (ans / a[s]) * a[t];
  cout << ans;
}
