#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long q;
  cin >> q;
  long long pre[500000 + 1] = {0};
  long long curr = 1;
  double res = 0;
  while (q--) {
    long long c;
    cin >> c;
    if (c == 1) {
      long long a;
      cin >> a;
      pre[curr] = pre[curr - 1] + a, curr++;
      long long mx = pre[curr - 1] - pre[curr - 2];
      long long l = 1, r = curr - 2;
      while (l < r) {
        long long mid = l + (r - l + 1) / 2;
        long long sum = pre[mid];
        sum += mx;
        double mean = (1.0 * sum) / (mid + 1);
        double key = pre[mid] - pre[mid - 1];
        if (mean <= key)
          r = mid - 1;
        else
          l = mid;
      }
      long long sum = pre[l];
      sum += mx;
      double mean = (1.0 * sum) / (l + 1);
      res = max(res, mx - mean);
    } else
      printf("%.10f\n", res);
  }
}
