#include <bits/stdc++.h>
using namespace std;
double bin_search(vector<int> &s, vector<long long> &sum) {
  long long left = 1, right = s.size();
  while (right - left > 1) {
    long long middle = left + (right - left) / 2;
    if (s.back() + sum[middle] >= (middle + 1) * s[middle - 1])
      left = middle;
    else
      right = middle;
  }
  return (double)(sum[left] + s.back()) / (left + 1);
}
int main() {
  int query;
  scanf("%d", &query);
  vector<int> s;
  vector<long long> ch_sum(1, 0);
  ch_sum.reserve(query);
  s.reserve(query);
  while (query--) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      s.push_back(x);
      ch_sum.push_back(ch_sum.back() + x);
    } else {
      if (s.size() == 1) {
        printf("%.9f\n", 0.0);
        continue;
      }
      if (s.size() == 2) {
        printf("%.9f\n", s.back() - (double)(s.back() + s[0]) / 2);
        continue;
      }
      printf("%.9f\n", s.back() - bin_search(s, ch_sum));
    }
  }
  return 0;
}
