#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  vector<long long> arr;
  arr.push_back(0);
  int sz = 1;
  long long max_ele = -1;
  long long pre_ind = 0;
  while (q--) {
    int x;
    cin >> x;
    if (x == 1) {
      long long v;
      cin >> v;
      if (sz == 0)
        arr.push_back(v);
      else
        arr.push_back(v + arr[sz - 1]);
      sz++;
      max_ele = v;
      continue;
    }
    if (sz == 2) {
      cout << setprecision(10) << 0.0l << "\n";
      continue;
    }
    long long pre_sum = arr[pre_ind];
    long long pre_numer = (pre_ind)*max_ele - pre_sum;
    long double val = (long double)pre_numer / (pre_ind + 1);
    while (pre_ind + 1 <= sz - 2) {
      if ((long double)((pre_ind + 1) * max_ele - arr[pre_ind + 1]) /
              (pre_ind + 2) >
          val) {
        val = (long double)((pre_ind + 1) * max_ele - arr[pre_ind + 1]) /
              (pre_ind + 2);
        pre_ind++;
      } else
        break;
    }
    cout << setprecision(10) << val << "\n";
  }
  return 0;
}
