#include <bits/stdc++.h>
using namespace std;
int n;
long long sum[500001];
long long v[500001];
static inline double mean(int pref) {
  return ((double)sum[pref] + (double)v[n]) / (double)(pref + 1.0);
}
static double minmean(int l, int r) {
  double minn;
  if (r - l <= 2) {
    minn = mean(l);
    for (; l <= r; l++) {
      minn = min(minn, mean(l));
    }
    return minn;
  }
  double mid1 = mean(l + (r - l) / 3), mid2 = mean(r - (r - l) / 3);
  if (mid1 > mid2)
    l = l + (r - l) / 3;
  else
    r = r - (r - l) / 3;
  return minmean(l, r);
}
int main() {
  int q;
  double maxx;
  cin >> q;
  n = 0;
  maxx = 0.0;
  for (int i = 0, type, x; i < q; i++) {
    cin >> type;
    if (type == 1) {
      cin >> x;
      n++;
      v[n] = x;
      sum[n] = sum[n - 1] + x;
      if (n > 1) {
        maxx = max(v[n] - minmean(1, n - 1), maxx);
      }
    }
    if (type == 2) {
      cout << fixed << setprecision(9) << maxx << '\n';
    }
  }
}
