#include <bits/stdc++.h>
using namespace std;
int n, k;
long long sum = 0, maxn, l;
long long a[500010];
int main() {
  int tt;
  cin >> tt;
  while (tt--) {
    cin >> n;
    if (n == 1) {
      k++;
      cin >> a[k];
      sum += (a[k] - maxn);
      maxn = a[k];
      while (l < k && a[l + 1] * (l + 1) < sum) {
        l++;
        sum += a[l];
      }
    } else {
      double ans = maxn - double(sum) / double(l + 1);
      printf("%.10lf\n", ans);
    }
  }
}
