#include <bits/stdc++.h>
using namespace std;
const int Q = 500000;
long long aa[Q], bb[Q];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int q;
  cin >> q;
  int cnt = 0;
  while (q--) {
    int t;
    cin >> t;
    if (t == 1) {
      int a;
      cin >> a;
      aa[cnt] = a, bb[cnt] = cnt > 0 ? bb[cnt - 1] + a : a, cnt++;
    } else {
      int lower = -1, upper = cnt;
      while (upper - lower > 1) {
        int h = (lower + upper) / 2;
        if (aa[h] <= (double)(bb[h] + aa[cnt - 1]) / (h + 1 + 1))
          lower = h;
        else
          upper = h;
      }
      int h = lower;
      printf("%.10f\n",
             aa[cnt - 1] - (double)(bb[h] + aa[cnt - 1]) / (h + 1 + 1));
    }
  }
  return 0;
}
