#include <bits/stdc++.h>
using namespace std;
long long a[500010];
long long sum;
int main() {
  int Q;
  int t;
  long long x;
  int cnt = 0;
  int r = 0;
  cin >> Q;
  for (int q = 1; q <= Q; q++) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%lld", &a[++cnt]);
    } else {
      long long SUM = sum + a[cnt];
      int n = r + 1;
      double ans = 1.0 * SUM / n;
      while (r < n && 1.0 * SUM / n > 1.0 * (SUM + a[r + 1]) / (n + 1)) {
        sum += a[++r];
        SUM = sum + a[cnt];
        n = r + 1;
        ans = 1.0 * SUM / n;
      }
      printf("%.7lf\n", a[cnt] - ans);
    }
  }
  return 0;
}
