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