#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long q;
  cin >> q;
  long long n = 0;
  vector<long long> S(q + 1, 0);
  while (q--) {
    long long x;
    cin >> x;
    if (x == 1) {
      long long y;
      cin >> y;
      n++;
      S[n] = y + S[n - 1];
    } else {
      if (n == 1) {
        cout << 0 << "\n";
        continue;
      }
      long long l = 1, r = n, m;
      double ans = 0;
      while (l <= r) {
        m = (l + r) >> 1;
        long long avg = S[n] - S[n - 1] + S[m];
        if (avg > (m + 1) * (S[m] - S[m - 1])) {
          ans = (double)(m * (S[n] - S[n - 1]) - S[m]) / (m + 1);
          l = m + 1;
        } else
          r = m - 1;
      }
      printf("%.10lf\n", ans);
    }
  }
}
