#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 17;
long long a[MAXN], sum[MAXN];
int main(int argc, char const *argv[]) {
  int q, n = 1, k = 0;
  cin >> q;
  while (q--) {
    int cmd;
    cin >> cmd;
    if (cmd == 1) {
      long long tmp;
      cin >> tmp;
      a[n] = tmp;
      sum[n] = sum[n - 1] + a[n];
      n++;
    } else {
      while (k < n - 2) {
        if ((double)(a[n - 1] + sum[k]) / (k + 1) >
            (double)(a[n - 1] + sum[k + 1]) / (k + 2))
          k++;
        else
          break;
      }
      cout << fixed << setprecision(12)
           << (double)a[n - 1] - (double)(a[n - 1] + sum[k]) / (k + 1) << endl;
    }
  }
  return 0;
}
