#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const int maxn = 5e5 + 11;
int N, M, T, P, Q;
long long a[maxn], sum[maxn];
int n = 0, mx = 0;
bool check(int k) {
  long long res = 1LL * (k + 1) * a[k + 1] - sum[k] - 1LL * mx;
  return res > 0LL;
}
int main() {
  cin >> Q;
  while (Q--) {
    char op[5];
    scanf("%s", op);
    if (op[0] == '1') {
      int x;
      scanf("%d", &x);
      mx = x, n++;
      a[n] = x;
      sum[n] = sum[n - 1] + (long long)x;
    } else {
      int left = 0, right = n - 1;
      while (left < right) {
        int mid = (left + right) / 2;
        if (check(mid)) {
          right = mid;
        } else {
          left = mid + 1;
        }
      }
      double res = 1.0 * mx - 1.0 * (sum[left] + mx) / (left + 1);
      printf("%.10f\n", res);
    }
  }
  return 0;
}
