#include <bits/stdc++.h>
using namespace std;
long long pref[1000000 + 100];
int a[1000000 + 100], idx;
int q;
int main() {
  scanf("%d", &q);
  int pok = 1;
  double pros;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      a[++idx] = x;
      pref[idx] = pref[idx - 1] + 1LL * x;
      continue;
    }
    if (idx == 1) {
      printf("%.10lf\n", 0);
      continue;
    }
    if (idx == 2) {
      printf("%.10lf\n", a[2] - (a[1] + a[2]) / 2.0);
      continue;
    }
    long long pp = pref[pok] + a[idx];
    for (int i = pok + 1; i < idx; i++) {
      if (a[i] < pp * 1.0 / i) {
        pp += 1LL * a[i];
        pok = i;
      } else
        break;
    }
    printf("%.10lf\n", a[idx] - pp * 1.0 / (pok + 1));
  }
  return 0;
}
