#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
int main() {
  int q;
  scanf("%d", &q);
  int ptr = 0;
  double cur = 0;
  int mx = -1;
  for (int i = 1; i <= q; i++) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      vec.push_back(x);
    } else {
      if (mx != -1) {
        double dif = vec[vec.size() - 1] - mx;
        cur += ((dif * 1.0 * ptr) / (1.0 * (ptr + 1)));
      }
      while (ptr < (vec.size() - 1)) {
        double fnd = (cur * (ptr + 1)) / (1.0 * (ptr + 2));
        fnd += (1.0 * (vec[vec.size() - 1] - vec[ptr])) / (1.0 * (ptr + 2));
        if (fnd > cur) {
          ptr++;
          cur = fnd;
        } else {
          break;
        }
      }
      mx = vec[vec.size() - 1];
      printf("%lf\n", cur);
    }
  }
}
