#include <bits/stdc++.h>
const int maxn = 5e5 + 5;
int q, n, a[maxn];
long long sum[maxn];
bool check(int x) {
  if (x == 0) return true;
  double ave_0;
  if (x == 1)
    ave_0 = a[n - 1];
  else
    ave_0 = (sum[x - 2] + a[n - 1]) / (double)x;
  return ave_0 > a[x - 1];
}
int main() {
  scanf("%d", &q);
  while (q--) {
    int cmd;
    scanf("%d", &cmd);
    if (cmd == 1) {
      scanf("%d", &a[n]);
      if (n)
        sum[n] = sum[n - 1] + a[n];
      else
        sum[n] = a[n];
      n++;
    } else {
      int l = 0, r = n - 1;
      while (l < r) {
        int mid = (l + r) / 2 + 1;
        if (check(mid))
          l = mid;
        else
          r = mid - 1;
      }
      double ans;
      if (l == 0)
        ans = 0;
      else
        ans = a[n - 1] - (sum[l - 1] + a[n - 1]) / double(l + 1);
      printf("%f\n", ans);
    }
  }
  return 0;
}
