#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int inf = 0x3f3f3f3f;
int a[maxn], dp[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  dp[1] = 1000;
  for (int i = 1; i < n; i++)
    dp[i + 1] = max(dp[i], dp[i] / a[i] * a[i + 1] + dp[i] % a[i]);
  cout << dp[n] << endl;
  return 0;
}
