#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long arr[n], dp[n];
  dp[0] = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
    dp[i] = dp[i - 1] + 20;
    for (long long j = i - 1; j > 0; j--) {
      if (arr[i] - arr[j] >= 90) break;
      dp[i] = min(dp[i], dp[j - 1] + 50);
    }
    for (long long j = i - 1; j > 0; j--) {
      if (arr[i] - arr[j] >= 1440) break;
      dp[i] = min(dp[i], dp[j - 1] + 120);
    }
    cout << dp[i] - dp[i - 1] << endl;
  }
}
