import math a,b,theta = input().split() a = float(a) b = float(b) theta = float(theta) theta_radians = math.radians(theta) c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta_radians)) print("c = {:.4f}".format(c))