#include <bits/stdc++.h>
using namespace std;
int setb(int n, int pos) { return n = n | (1 << pos); }
int resb(int n, int pos) { return n = n & ~(1 << pos); }
bool checkb(int n, int pos) { return (bool)(n & (1 << pos)); }
double ret = 0.0;
long long idx, k, ara[1000005], sum;
void init(long long x) {
  ara[++k] = x;
  idx = 0;
  sum = x;
  ret = x;
}
void go(long long x) {
  sum -= ara[k];
  ara[++k] = x;
  sum += ara[k];
  ret = (double)sum / (idx + 1);
  for (long long i = idx + 1; i < k; i++) {
    if (ret < ara[i]) break;
    sum += ara[i];
    idx = i;
    ret = (double)sum / (idx + 1);
  }
}
int main() {
  long long n, i, ins, x;
  scanf("%lld", &n);
  for (i = 1; i <= n; i++) {
    scanf("%lld", &ins);
    if (ins == 1) {
      scanf("%lld", &x);
      if (i == 1)
        init(x);
      else
        go(x);
    } else
      printf("%.10f\n", ara[k] - ret);
  }
  return 0;
}
