#include <bits/stdc++.h>
using namespace std;
inline void up(int& x, int y) {
  x = x + y < 1000000007 ? x + y : x + y - 1000000007;
}
inline int read() {
  int x = 0, f = 1;
  char 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;
}
long long sum;
int q, a, b, c, st[500010], pos, top;
int main() {
  cin >> q;
  while (q--) {
    scanf("%d", &a);
    if (a == 1) {
      scanf("%d", &b);
      st[++top] = b;
      while (pos + 1 < top &&
             1.0 * (sum + st[top]) / (pos + 1) >
                 1.0 * (sum + st[top] + st[pos + 1]) / (pos + 2)) {
        sum += st[++pos];
      }
    } else {
      printf("%.8f\n", 1.0 * st[top] - 1.0 * (sum + st[top]) / (pos + 1));
    }
  }
  return 0;
}
