#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 7, mod = 1000000007, M = 2e9;
int n, arr[N] = {0}, Q;
double cum[N] = {0};
vector<double> v;
double solve() {
  double x = v.back();
  int st = 0, en = v.size() - 2;
  if (v.size() == 1) return 0.0;
  while (en - st > 5) {
    int midl = st + (en - st) / 3, midr = en - (en - st) / 3;
    if (x - ((cum[midl] + x) / (midl + 2)) >
        x - ((cum[midr] * 1.0 + x) / (midr + 2))) {
      en = midr;
    } else
      st = midl;
  }
  double mx = -1;
  for (int i = st; i <= en; ++i) {
    if (x - ((cum[i] * 1.0 + x) / (i + 2)) > mx)
      mx = x - ((cum[i] * 1.0 + x) / (i + 2));
    double a = x, b = cum[i];
  }
  return mx;
}
int main() {
  cin >> Q;
  while (Q--) {
    int x, y;
    cin >> x;
    if (x == 2)
      printf("%.10f\n", solve());
    else {
      cin >> y;
      v.push_back((double)y);
      if (v.size() == 1) {
        cum[0] = y;
      } else
        cum[v.size() - 1] = cum[v.size() - 2] + y;
    }
  }
  return 0;
}
