#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1, ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
const long long N = 5e5 + 5;
long long q, sum[N], a[N], cnt;
inline double f(long long x) {
  return (double)a[cnt] - (sum[x] + a[cnt]) / (double)(x + 1);
}
signed main() {
  q = read();
  for (long long i = 1; i <= q; i++) {
    long long l, r, opt = read();
    if (opt == 1) {
      a[++cnt] = read();
      sum[cnt] = sum[cnt - 1] + a[cnt];
    } else {
      l = 1, r = cnt - 1;
      while (l < r - 2) {
        long long k = (r - l) / 3;
        long long lmid = l + k, rmid = r - k;
        if (f(lmid) > f(rmid)) {
          r = rmid;
        } else {
          if (f(lmid) < f(rmid)) {
            l = lmid;
          } else {
            l = lmid;
            r = rmid;
          }
        }
      }
      double ans = 0;
      for (long long j = l; j <= r; j++) ans = max(ans, f(j));
      printf("%.8lf\n", ans);
    }
  }
  return 0;
}
