#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  long long int x = 0;
  vector<long long int> sum = {};
  vector<long long int> val = {};
  for (int i = 0; i < (int)q; i++) {
    int op;
    cin >> op;
    if (op == 1) {
      cin >> x;
      sum.push_back(((sum.size()) ? sum.back() : 0) + x);
      long long int v[2];
      v[0] = sum.size() * sum.back();
      v[1] = (sum.size() >= 2) ? ((sum.size() + 1) * sum[sum.size() - 2]) : 0;
      val.push_back(v[0] - v[1]);
    } else {
      auto itr = upper_bound(val.begin(), val.end(), x);
      itr--;
      long long int v = sum[distance(val.begin(), itr)];
      cout << setprecision(16)
           << x - (double)(x + v) / (double)(distance(val.begin(), itr) + 2)
           << endl;
    }
  }
}
