#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
  char c;
  bool nega = 0;
  while ((!isdigit(c = getchar())) && (c != '-'))
    ;
  if (c == '-') {
    nega = 1;
    c = getchar();
  }
  x = c - 48;
  while (isdigit(c = getchar())) x = x * 10 + c - 48;
  if (nega) x = -x;
}
template <typename T>
inline void writep(T x) {
  if (x > 9) writep(x / 10);
  putchar(x % 10 + 48);
}
template <typename T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  writep(x);
}
template <typename T>
inline void writeln(T x) {
  write(x);
  putchar('\n');
}
int n, q;
long long a[500001];
long long s[500001];
long double ans = 0;
int main() {
  read(q);
  {
    int t;
    for (int i = (1); i <= (q); i++) {
      read(t);
      if (t == 2)
        cout << setprecision(10) << fixed << ans << '\n';
      else {
        n++;
        read(a[n]);
        s[n] = s[n - 1] + a[n];
        int l = 1, r = n - 1, m, pos = 1;
        while (l <= r) {
          m = (l + r) / 2;
          if (s[m] + a[n] >= a[m] * (m + 1)) {
            pos = m;
            l = m + 1;
          } else
            r = m - 1;
        }
        ans = max(ans, ((long double)a[n]) -
                           ((long double)s[pos] + a[n]) / (pos + 1));
      }
    }
  }
}
