#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long money = 1000;
  int have = 0;
  int sell = 300;
  for (int i = 0; i < n; i++) {
    if (a[i] == *max_element(a.begin(), a.end())) {
      money += have * a[i];
      break;
    }
    if (a[i] > sell) {
      money += have * a[i];
      have = 0;
      sell = a[i];
    } else if (a[i] == sell)
      continue;
    else {
      have = money / a[i];
      money -= have * a[i];
      sell = a[i];
    }
  }
  cout << money << endl;
  return 0;
}
