import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines from math import acos a,b = map(float,read().split()) theta = acos(a) - acos(b) answer = 4 * theta print(answer)