from math import cos,pi
from scipy.optimize import bisect

f = lambda x : cos(x) - 0.3
a = bisect(f,-pi,0)

print(a)
