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