#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c;
  int s = 0, t = 1;
  while (!isdigit(c = getchar()))
    if (c == '-') t = -1;
  do {
    s = s * 10 + c - '0';
  } while (isdigit(c = getchar()));
  return s * t;
}
inline long long readl() {
  char c;
  long long s = 0;
  int t = 1;
  while (!isdigit(c = getchar()))
    if (c == '-') t = -1;
  do {
    s = s * 10 + c - '0';
  } while (isdigit(c = getchar()));
  return s * t;
}
priority_queue<long long> q;
int main() {
  long long n;
  n = readl();
  long long mx = 0, k = 0, num = 1;
  for (int i = 1; i <= n; i++) {
    long long c;
    c = readl();
    if (c == 1) {
      long long x;
      x = readl();
      if (x > mx) {
        k -= mx;
        k += x;
        if (mx) q.push(-mx);
        mx = x;
      } else
        q.push(-x);
      while (!q.empty()) {
        long long c = q.top();
        c = -c;
        if ((k + c) * (num) > k * (num + 1)) break;
        q.pop();
        k += c;
        num++;
      }
    } else
      printf("%.10lf\n", (double)mx - (double)k / num);
  }
}
