#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 1;
vector<long long> v;
long long p[maxn * 5], n;
long long dih(long long l, long long r, long double ans, long long sz) {
  while (l != r) {
    long long mid = (l + r + 1) / 2;
    long double tmp =
        (long double)(p[mid] + v[sz - 1]) / (long double)(mid + 2);
    if (mid) {
      if (tmp >
          ((long double)(p[mid - 1] + v[sz - 1]) / (long double)(mid + 1))) {
        r = mid - 1;
      } else {
        l = mid;
      }
    } else {
      if (tmp <= ans) {
        l = mid;
      } else {
        r = mid - 1;
      }
    }
  }
  return l;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long t, x;
    cin >> t;
    if (t == 1) {
      cin >> x;
      v.push_back(x);
      long long sz = v.size();
      if (sz == 1) {
        p[0] = x;
      } else {
        p[sz - 1] = p[sz - 2] + x;
      }
    } else {
      long long sz = v.size();
      if (sz == 1) {
        cout << "0.0000000" << endl;
      } else {
        long double ans = (long double)(v[0] + v[sz - 1]) / (long double)(2);
        long long j = dih(0, sz - 2, ans, sz);
        ans = min(ans, (long double)(p[j] + v[sz - 1]) / (long double)(j + 2));
        ans = v[sz - 1] - ans;
        cout << fixed << setprecision(7) << ans << "\n";
      }
    }
  }
  return 0;
}
