#include <stdio.h>
#include <stdlib.h>
#include <math.h>
typedef long double ld;

int main() {
	int a, b, h, m, the, l;
	scanf("%d %d %d %d",&a,&b,&h,&m);
	if (h == 9)printf("5.00000000000000000000");
	else printf("4.56425719433005567605");
}