#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &x) {
  char c;
  bool op = 0;
  while (c = getchar(), c < '0' || c > '9')
    if (c == '-') op = 1;
  x = c - '0';
  while (c = getchar(), c >= '0' && c <= '9') x = x * 10 + c - '0';
  if (op) x = -x;
}
template <class T>
void write(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar('0' + x % 10);
}
const int N = 500005;
int n, tot, m, op;
double ans, a[N], sum[N];
double ave(int x) { return (sum[x] + a[tot]) / (x + 1); }
int main() {
  read(n);
  while (n--) {
    read(op);
    if (op == 1) {
      read(a[++tot]);
      sum[tot] = sum[tot - 1] + a[tot];
      while (m + 1 < tot && ave(m + 1) < ave(m)) m++;
      ans = max(ans, a[tot] - ave(m));
    } else
      printf("%.10lf\n", ans);
  }
  return 0;
}
