#include <bits/stdc++.h>
const int N = 1e6 + 7;
using namespace std;
long long sum[N], x;
int cnt = 0;
double ans = 0;
double C(int mid) { return 1.0 * (sum[mid] + x) / (mid + 1); }
double solve(int l, int r) {
  int midl, midr;
  while (r - l > 2) {
    midl = (2.0 * l + r) / 3;
    midr = (l + 2.0 * r) / 3;
    if (C(midl) <= C(midr))
      r = midr;
    else
      l = midl;
  }
  return min(min(C(l), C(r)), C((l + r) / 2));
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      scanf("%lld", &x);
      sum[++cnt] = sum[cnt - 1] + x;
    } else {
      double tmp = solve(1, cnt - 1);
      ans = x - tmp;
      printf("%.10f\n", ans);
    }
  }
  return 0;
}
