#include <bits/stdc++.h>
using namespace std;
inline void splay(int &v) {
  v = 0;
  char c = 0;
  int p = 1;
  while (c < '0' || c > '9') {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    v = (v << 3) + (v << 1) + c - '0';
    c = getchar();
  }
  v *= p;
}
const int N = 1000010;
double ans = 0;
int a[N], cnt, l, q;
long long sum;
int main() {
  splay(q);
  for (int id; q--;) {
    splay(id);
    if (id == 2)
      printf("%.10f\n", ans);
    else {
      splay(a[++cnt]);
      while (l < cnt - 1) {
        double now, p;
        now = (long double)a[cnt] - (long double)(sum + a[cnt]) / (l + 1);
        p = (long double)a[cnt] -
            (long double)(sum + a[cnt] + a[l + 1]) / (l + 2);
        ans = max(ans, now);
        if (p >= now) {
          ans = max(ans, p);
          sum += a[l + 1];
          l++;
        } else
          break;
      }
    }
  }
}
