#include <bits/stdc++.h>
using namespace std;
const double eps = 0.000000001;
int main() {
  int queries;
  cin >> queries;
  vector<double> numbers;
  double current_end = 0;
  double pred_ans = 0;
  int pred_max = 0;
  while (queries--) {
    int type;
    cin >> type;
    if (type == 1) {
      int x;
      cin >> x;
      numbers.push_back(x);
    } else {
      pred_ans +=
          (numbers.back() - pred_max) * (current_end) / (current_end + 1);
      pred_max = numbers.back();
      for (int i = current_end; i < numbers.size() - 1; ++i) {
        double kek = (pred_ans * (current_end + 1) + (pred_max - numbers[i])) /
                     (current_end + 2);
        if ((kek - pred_ans) > eps) {
          pred_ans = kek;
          ++current_end;
        } else {
          break;
        }
      }
      cout << fixed;
      cout.precision(8);
      cout << pred_ans << "\n";
    }
  }
  return 0;
}
