#include <bits/stdc++.h>
using namespace std;
int l, n, a[500010], opt, num;
long long b[500010];
double pan(int x) { return (b[x] + a[num]) / ((double)(x + 1)); }
int main() {
  cin >> n;
  while (n--) {
    cin >> opt;
    if (opt == 1) {
      cin >> a[++num];
      b[num] = a[num] + b[num - 1];
    } else {
      while (l < num - 1 && pan(l + 1) < pan(l)) l++;
      printf("%.9lf\n", a[num] - pan(l));
    }
  }
}
