#include <bits/stdc++.h>
using namespace std;
long long a[500005], a_sum[500005];
int m;
double f(int x) { return (double)a[m] - ((a_sum[x] + a[m]) / (double)(x + 1)); }
int main() {
  int n, i, j, x, l, r, lmid, rmid;
  double Max;
  a_sum[0] = 0;
  m = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (x == 1) {
      m++;
      scanf("%d", &a[m]);
      a_sum[m] = a_sum[m - 1] + a[m];
    } else {
      l = 1;
      r = m - 1;
      while (r - l > 2) {
        lmid = l + (r - l) / 3;
        rmid = r - (r - l) / 3;
        if (f(lmid) > f(rmid)) {
          r = rmid;
        } else if (f(lmid) < f(rmid)) {
          l = lmid;
        } else {
          l = lmid;
          r = rmid;
        }
      }
      Max = 0;
      for (j = l; j <= r; j++) Max = max(Max, f(j));
      printf("%.8lf\n", Max);
    }
  }
  return 0;
}
