#include <bits/stdc++.h>
using namespace std;
double sum[500005];
int n, now;
double ask(int x) {
  x--;
  return (x * 1.0 * now - sum[x]) / (x + 1.0);
}
int main() {
  int t, q;
  int l, r, ml, mr;
  scanf("%d", &q);
  while (q--) {
    scanf("%d", &t);
    if (t == 1) {
      n++;
      scanf("%d", &now);
      sum[n] = sum[n - 1] + now;
    } else {
      l = 1;
      r = n;
      while (r - l > 1) {
        ml = l + (r - l + 1) / 3;
        mr = r - (r - l + 1) / 3;
        if (ask(ml) > ask(mr))
          r = mr;
        else
          l = ml;
      }
      printf("%.7f\n", max(ask(l), ask(r)));
    }
  }
  return 0;
}
