#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
long long a[N], s[N], r, n, x, y, t;
long double ans;
long double f(long long k) {
  if (k == t) return 1.0 * a[t] - (s[t] * 1.0 / t);
  return 1.0 * a[t] - ((s[k] + a[t]) * 1.0 / (k + 1));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  t = 0;
  r = 1;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    if (x == 1) {
      cin >> y;
      a[++t] = y;
      s[t] = s[t - 1] + a[t];
      if (t == 1) continue;
      ans = max(ans, f(r));
      while (r < t && f(r + 1) > ans) {
        r++;
        ans = f(r);
      }
    } else {
      cout.precision(10);
      cout << fixed << ans << '\n';
    }
  }
}
