#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const int maxn = 2333333;
const int mod = 1000000007;
int q;
int a[maxn], R = 1;
double pre[maxn];
double cal(int mid) {
  double res = 0;
  if (mid != R) {
    return a[R] - (pre[mid] + a[R]) / (mid + 1);
  } else
    return a[R] - pre[R] / R;
}
int main() {
  scanf("%d", &q);
  double ans = 0;
  pre[0] = 0;
  while (q--) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d", a + R);
      pre[R] = pre[R - 1] + a[R];
      int l = 1, r = R;
      while (l < r) {
        int mid = (l + r) >> 1;
        int midl = (2 * l + r) / 3;
        int midr = (l + 2 * r) / 3;
        double tmp = cal(mid);
        double tmpl = cal(midl);
        double tmpr = cal(midr);
        if (tmpl > tmpr)
          r = midr;
        else
          l = midl + 1;
      }
      double res = max(cal(l), cal(l + 1));
      res = max(cal(l), cal(l - 1));
      if (res > ans) ans = res;
      R++;
    } else
      printf("%.8f\n", ans);
  }
  return 0;
}
