#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e6 + 10;
long long q[MAXN], val[MAXN], pre[MAXN], cnt, lb, sum;
long long N;
double ans;
int main() {
  scanf("%lld", &N);
  for (long long i = 1, kind; i <= N; i++) {
    scanf("%lld", &kind);
    if (kind == 1) {
      long long x;
      scanf("%lld", &x);
      sum -= val[cnt];
      sum += x;
      val[++cnt] = x;
      while (lb < cnt && sum - (val[lb + 1] * (lb + 1)) > 0) {
        sum += val[lb + 1];
        lb++;
      }
    } else {
      printf("%.10f\n", val[cnt] - (1.0 * sum / (lb + 1)));
    }
  }
  return 0;
}
