#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int n;
long long t[N + 2], dp[N + 2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    dp[i] = dp[i - 1] + 20;
    for (int j = i - 1; j >= 1 && t[i] - t[j] < 1440; j--) {
      if (t[i] - t[j] < 90) dp[i] = min(dp[i], dp[j - 1] + 50);
      dp[i] = min(dp[i], dp[j - 1] + 120);
    }
    cout << dp[i] - dp[i - 1] << '\n';
  }
  return 0;
}
