#include <bits/stdc++.h>
using namespace std;
long long sum[500100];
int arr[500100];
int main() {
  int q;
  cin >> q;
  int j = 1;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      arr[j] = x;
      sum[j] = sum[j - 1] + x;
      j++;
    } else {
      if (j == 2) {
        printf("0.0000000000\n");
        continue;
      }
      int l = 1, r = j - 2;
      while (r - l > 10) {
        int mid1 = l + (r - l) / 3;
        int mid2 = r - (r - l) / 3;
        double ans1 = arr[j - 1] - (sum[mid1] + arr[j - 1]) * 1.0 / (mid1 + 1);
        double ans2 = arr[j - 1] - (sum[mid2] + arr[j - 1]) * 1.0 / (mid2 + 1);
        if (ans1 > ans2)
          r = mid2;
        else
          l = mid1;
      }
      double ans = 0;
      for (int i = l; i <= r; ++i)
        ans = max(ans, arr[j - 1] - (sum[i] + arr[j - 1]) * 1.0 / (i + 1));
      printf("%.7f\n", ans);
    }
  }
  return 0;
}
