#include <stdio.h>
int main()
{
	int a,b,c,d,result;
	while(scanf("%d %d %d %d",&a,&b,&c,&d)!=EOF)
	{
		if(b<=c||d<=a)
			printf("0\n\nAlice and Bob were not holding their buttons at the same time, so the answer is zero seconds.\n");
		else
		{
			if(a>c)
			{
				if(b<d)
				{
					result=b-a;
					printf("%d\n\n",result);
					printf("Alice started holding down her button %d second after the start-up of \n",a);
					printf("the robot, and released her button %d second after the start-up.\n",b);
					printf("Bob started holding down his button %d second after the start-up, \n",c);
					printf("and released his button %d second after the start-up.\n",d);
					printf("Therefore, the time when both of them were holding down their \n");
					printf("buttons, is the %d seconds from %d seconds after the start-up to %d\n",a,b,result);
				}
				else
				{
					result=d-a;
					printf("%d\n\n",result);
					printf("Alice started holding down her button %d second after the start-up of \n",a);
					printf("the robot, and released her button %d second after the start-up.\n",b);
					printf("Bob started holding down his button %d second after the start-up, \n",c);
					printf("and released his button %d second after the start-up.\n",d);
					printf("Therefore, the time when both of them were holding down their \n");
					printf("buttons, is the %d seconds from %d seconds after the start-up to %d\n",a,d,result);
				}
			}
			else
			{
				if(b>d)
				{
					result=d-c;
					printf("%d\n\n",result);
					printf("Alice started holding down her button %d second after the start-up of \n",a);
					printf("the robot, and released her button %d second after the start-up.\n",b);
					printf("Bob started holding down his button %d second after the start-up, \n",c);
					printf("and released his button %d second after the start-up.\n",d);
					printf("Therefore, the time when both of them were holding down their \n");
					printf("buttons, is the %d seconds from %d seconds after the start-up to %d\n",c,d,result);
				}
				else
				{
					result=b-c;
					printf("%d\n\n",result);
					printf("Alice started holding down her button %d second after the start-up of \n",a);
					printf("the robot, and released her button %d second after the start-up.\n",b);
					printf("Bob started holding down his button %d second after the start-up, \n",c);
					printf("and released his button %d second after the start-up.\n",d);
					printf("Therefore, the time when both of them were holding down their \n");
					printf("buttons, is the %d seconds from %d seconds after the start-up to %d\n",c,b,result);
				}
			}
		}
	}
	return 0;
}