#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
inline void base() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
vector<double> ls;
int l = 0, r = 0;
double ans = 0, mean = 0;
int main() {
  base();
  cout << fixed << setprecision(9);
  int q;
  cin >> q;
  while (q--) {
    int type;
    cin >> type;
    if (type == 1) {
      double x;
      cin >> x;
      mean *= r + 1;
      if (ls.size() != 0) mean -= ls[ls.size() - 1];
      ls.push_back(x);
      mean += x;
      mean /= (r + 1);
    } else {
      if (ls.size() == 1) {
        double tmp = 0;
        cout << tmp << endl;
      } else {
        while (r < ls.size()) {
          double nxMean = mean * (r + 1);
          nxMean += ls[r];
          nxMean /= (r + 2);
          if (nxMean > mean) break;
          mean = nxMean;
          r++;
        }
        cout << ls[ls.size() - 1] - mean << endl;
      }
    }
  }
  return 0;
}
