#include <bits/stdc++.h>
using namespace std;
int q, ope;
long long a[500005], x, lst, s;
int n, pr;
int main() {
  cin >> q;
  while (q--) {
    cin >> ope;
    if (ope == 1) {
      cin >> x;
      a[++n] = x;
      while (pr + 1 <= n && double(a[pr + 1]) <= (s + a[n]) / double(pr + 1)) {
        pr++;
        s += a[pr];
      }
    }
    if (ope == 2) {
      printf("%.10lf\n", double(a[n]) - double(s + a[n]) / (pr + 1));
    }
  }
  return 0;
}
