#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int n;
int m;
vector<int> vt;
int main() {
  std ::ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vt.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> vt[i];
  }
  int ans = 1000;
  for (int i = 0; i + 1 < n; ++i) {
    if (vt[i] >= vt[i + 1]) {
      continue;
    }
    int dp = ans / vt[i];
    ans -= dp * vt[i];
    ans += vt[i + 1] * dp;
  }
  cout << ans << endl;
  return 0;
}
