#include <bits/stdc++.h>
const int N = 500005;
long long a[N], sum[N], n;
int main() {
  int q, x, lb, ub, m;
  scanf("%d", &q);
  n = 0;
  sum[0] = 0;
  while (q--) {
    scanf("%d", &x);
    if (x == 1) {
      scanf("%d", &x);
      a[++n] = x;
      sum[n] = sum[n - 1] + x;
    } else {
      lb = 0;
      ub = n;
      while (ub - lb > 1) {
        m = (lb + ub) / 2;
        if (m * a[m] - sum[m - 1] - a[n] >= 0)
          ub = m;
        else
          lb = m;
      }
      printf("%.10f\n", a[n] - double(a[n] + sum[ub - 1]) / ub);
    }
  }
  return 0;
}
