#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, x = 0, a;
  long double seredne = 0, kil = 0, maxx = 0;
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  vector<long long> q;
  int pos = 0;
  bool out = false, were_here = false;
  for (int i = 0; i < t; ++i) {
    cin >> a;
    if (a == 1) {
      were_here = true;
      cin >> x;
      if (out && kil != 0) {
        seredne -= maxx;
        out = false;
        --kil;
      }
      maxx = x;
      q.push_back(x);
    } else {
      if (!were_here) {
        cout << "0\n";
        continue;
      }
      if (!out) {
        ++kil;
        seredne += maxx;
        out = true;
      }
      while (seredne / kil > q[pos] && pos < q.size()) {
        seredne += q[pos];
        ++kil;
        ++pos;
      }
      cout << fixed << setprecision(7) << (maxx - seredne / kil) << '\n';
    }
  }
}
