'''simple docstring'''

from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

__a:			Optional[Any]	       =       6_37_81_37.0
__a:			Dict	       =       6_35_67_52.31_42_45
__a:			int	       =       6_37_81_37
def       __UpperCamelCase	(       UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase					):
 lowercase__    :   List[str]						= (AXIS_A - AXIS_B) / AXIS_A
 # Parametric latitudes
 # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
 lowercase__    :   str						= atan((1 - flattening) * tan(radians(UpperCAmelCase					)					)					)
 lowercase__    :   Union[str, Any]						= atan((1 - flattening) * tan(radians(UpperCAmelCase					)					)					)

 # Compute central angle between two points
 # using haversine theta. sigma =  haversine_distance / equatorial radius
 lowercase__    :   List[str]						= haversine_distance(UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase					) / EQUATORIAL_RADIUS

 # Intermediate P and Q values
 lowercase__    :   Optional[Any]						= (b_lata + b_lata) / 2
 lowercase__    :   List[str]						= (b_lata - b_lata) / 2

 # Intermediate X value
 # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
 lowercase__    :   Any						= (sin(UpperCAmelCase					) ** 2) * (cos(UpperCAmelCase					) ** 2)
 lowercase__    :   Optional[Any]						= cos(sigma / 2					) ** 2
 lowercase__    :   List[str]						= (sigma - sin(UpperCAmelCase					)) * (x_numerator / x_demonimator)

 # Intermediate Y value
 # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
 lowercase__    :   int						= (cos(UpperCAmelCase					) ** 2) * (sin(UpperCAmelCase					) ** 2)
 lowercase__    :   Union[str, Any]						= sin(sigma / 2					) ** 2
 lowercase__    :   str						= (sigma + sin(UpperCAmelCase					)) * (y_numerator / y_denominator)

 return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
       import doctest

       doctest.testmod()


'''simple docstring'''

def       __UpperCamelCase	(       ):
 lowercase__    :   Any						= [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

 lowercase__    :   Any						= 6
 lowercase__    :   Optional[Any]						= 1
 lowercase__    :   int						= 1901

 lowercase__    :   List[str]						= 0

 while year < 2001:
  day += 7

  if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
   if day > days_per_month[month - 1] and month != 2:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]
   elif day > 29 and month == 2:
    month += 1
    lowercase__    :   Any						= day - 29
  else:
   if day > days_per_month[month - 1]:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]

  if month > 12:
   year += 1
   lowercase__    :   Dict						= 1

  if year < 2001 and day == 1:
   sundays += 1
 return sundays


if __name__ == "__main__":
  print(solution())

