#include <stdio.h>
int main() {
    int weight, speed;
    float balance, tilt;
    flot stabilityIndex;
    scanf("%d", &weight);
    scanf("%d", &speed);
    scanf("%f", &balance);
    scanf("%f", &tilt);
    if (weight <= 0 || speed <= 0 || balance <= 0 || tilt <= 0) {
        printf("Invalid input");
    } else {
        stabilityIndex = (weight + speed + balance + tilt) / 4.0;
        printf("%.2f",stabilityIndex);
    }
    return 0;
}