#include <bits/stdc++.h>
using namespace std;
long long qp(long long a, long long b, long long mod) {
  long long t = 1;
  while (b) {
    if (b & 1) t = t * a % mod;
    b >>= 1;
    a = a * a % mod;
  }
  return t;
}
struct DOT {
  int x;
  int y;
};
void ex() {
  puts("-1");
  exit(0);
}
const int dx[4] = {0, 0, -1, 1};
const int dy[4] = {1, -1, 0, 0};
const int inf = 0x3f3f3f3f;
const long long Linf = 0x3f3f3f3f3f3f3f3f;
const long long mod = 1e9 + 7;
;
const int maxn = 5e5 + 33;
int n;
int knd, x;
int a[maxn];
long long sum[maxn];
int mx;
int tot;
double pre;
double ans;
int main() {
  scanf("%d", &n);
  pre = -Linf;
  while (n--) {
    scanf("%d", &knd);
    if (knd == 1) {
      scanf("%d", &x);
      a[++tot] = x;
      sum[tot] = sum[tot - 1] + x;
      mx = x;
    } else {
      ans = Linf;
      int l = 1, r = tot - 1;
      while (l <= r) {
        int m = l + (r - l) / 3;
        int rm = r - (r - l) / 3;
        if ((1.0 * mx + sum[m]) / (m + 1) < (1.0 * mx + sum[rm]) / (rm + 1)) {
          ans = min(ans, (1.0 * mx + sum[m]) / (m + 1));
          r = rm - 1;
        } else {
          ans = min(ans, (1.0 * mx + sum[rm]) / (rm + 1));
          l = m + 1;
        }
      }
      if (pre > mx - ans) {
        printf("%.12lf\n", max(0.000, pre));
      } else {
        printf("%.12lf\n", max(0.000000, mx - ans));
        pre = mx - ans;
      }
    }
  }
}
