#include <bits/stdc++.h>
using namespace std;
int N;
long long S[500010];
int main() {
  int nq;
  scanf("%d", &nq);
  double ans = 0;
  double mnmean = 2e9;
  for (int qi = 1; qi <= nq; qi++) {
    int qt;
    scanf("%d", &qt);
    if (qt == 1) {
      N++;
      long long x;
      scanf("%lld", &x);
      S[N] = S[N - 1] + x;
      int lo = 0, hi = N;
      while (hi - lo > 1) {
        int mid = (lo + hi) / 2;
        if ((S[mid - 1] + x) / double(mid) > (S[mid] + x) / double(mid + 1)) {
          lo = mid;
        } else {
          hi = mid;
        }
      }
      mnmean = min(mnmean, x / double(N));
      ans = max(ans, x - (S[hi - 1] + x) / double(hi));
    } else {
      printf("%.10lf\n", ans);
    }
  }
}
