#include <bits/stdc++.h>
using namespace std;
const int maxn = 200 + 5;
int a[maxn], n;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int ans = 0;
  int now = 1000;
  a[0] = 1e9;
  for (int i = 1; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      int g = now / a[i - 1];
      now -= g * a[i - 1];
      now += g * a[i];
    }
  }
  cout << now << endl;
  return 0;
}
