#include <bits/stdc++.h>
using namespace std;
queue<long long> q;
long long Q, k, x, s, n;
int main() {
  scanf("%I64d", &Q);
  while (Q--) {
    scanf("%I64d", &k);
    if (k == 1) scanf("%I64d", &x), q.push(x);
    while (s + x > q.front() * (n + 1)) n++, s += q.front(), q.pop();
    if (k == 2) printf("%.6lf\n", x * 1.0 - (s + x) * 1.0 / (n + 1));
  }
  return 0;
}
