#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <typename T>
inline void rit(T &x) {
  char c;
  for (x = 0, c = getchar(); c < '-'; c = getchar())
    ;
  for (; c >= '0'; x = x * 10 + c - '0', c = getchar())
    ;
}
int Q, op, x, c, p = 1;
long long int s[500001];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  rit(Q);
  while (Q--) {
    rit(op);
    if (op == 1) {
      s[c + 1] = s[c] + x, ++c, rit(x);
    } else {
      while (p < c && s[p] + x >= (s[p + 1] - s[p]) * p) ++p;
      double ans = (double)x - (double)(s[p] + x) / p;
      int a = ans;
      cout << a << '.' << setw(7) << setfill('0') << (int)((ans - a) * 1e7)
           << '\n';
    }
  }
  return 0;
}
