#include <bits/stdc++.h>
using namespace std;
const int maxN = 5e5 + 10;
double snum[maxN];
int cnt;
double sum;
double check(int index1, int index2) {
  return (snum[cnt] - snum[cnt - 1] + snum[index1]) / (index1 + 1) <
         (snum[cnt] - snum[cnt - 1] + snum[index2]) / (index2 + 1);
}
int main() {
  int q = 0;
  cin >> q;
  while (q--) {
    int choice = 0;
    scanf("%d", &choice);
    if (choice == 1) {
      scanf("%lf", &snum[++cnt]);
      snum[cnt] += snum[cnt - 1];
    } else if (choice == 2) {
      int l = 1, r = cnt - 1;
      while (l < r) {
        int mid = (l + r) / 2;
        int midd = (mid + r) / 2;
        if (mid == midd) {
          midd++;
        }
        if (check(mid, midd)) {
          r = midd - 1;
        } else {
          l = mid + 1;
        }
      }
      printf("%.10f\n", snum[cnt] - snum[cnt - 1] -
                            (snum[cnt] - snum[cnt - 1] + snum[l]) / (l + 1));
    }
  }
  return 0;
}
