program pil_4_7_d(input,output);
const
	Pi = 3.141592653589;
var
	x, t, sinus : real;
	sign : boolean;
begin
	Write('Input x : ');
	Read(x);
	sign := x>0;
	x := abs(x);
	x := x - 2*Pi*trunc(x/(Pi*2));
	t := x - Pi/2*trunc(x/(Pi/2));
	if x>1.5*Pi then sinus := -cos(t)
	else if x>Pi then sinus := -sin(t)
	else if x>Pi/2 then sinus := cos(t)
	else sinus := sin(t);
	if not sign then sinus := -sinus;
	WriteLn('Sin(x) = ', sinus:1:2);
end.