#include <bits/stdc++.h>
using namespace std;
int a[510000];
int cnt = 0, maxx = 0, pre = 0;
double ans;
long long sum;
int main() {
  int q;
  scanf("%d", &q);
  while (q--) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      scanf("%d", &a[++cnt]);
      sum += a[cnt] - maxx;
      maxx = a[cnt];
      while (pre < cnt && maxx - 1.0 * sum / (pre + 1) <
                              maxx - 1.0 * (sum + a[pre + 1]) / (pre + 2))
        sum += a[++pre];
      if (maxx - 1.0 * sum / (pre + 1) > ans)
        ans = maxx - 1.0 * sum / (pre + 1);
    } else
      printf("%.10f\n", ans);
  }
  return 0;
}
