


'''simple docstring'''

import os
from pathlib import Path





def __snake_case      (   ):
 from torch.utils.cpp_extension import load

 lowerCamelCase_  				=						Path(UpperCAmelCase_	).resolve().parent.parent.parent / "kernels" / "deformable_detr"
 lowerCamelCase_  				=						[
     root / filename
     for filename in [
         "vision.cpp",
         os.path.join("cpu"      ,       "ms_deform_attn_cpu.cpp"	),
         os.path.join("cuda"      ,       "ms_deform_attn_cuda.cu"	),
     ]
 ]

 load(
     "MultiScaleDeformableAttention"      ,       UpperCAmelCase_      ,       with_cuda=UpperCAmelCase_      ,       extra_include_paths=[str(UpperCAmelCase_	)]      ,       extra_cflags=["-DWITH_CUDA=1"]      ,       extra_cuda_cflags=[
         "-DCUDA_HAS_FP16=1",
         "-D__CUDA_NO_HALF_OPERATORS__",
         "-D__CUDA_NO_HALF_CONVERSIONS__",
         "-D__CUDA_NO_HALF2_OPERATORS__",
     ]      ,       )

 import MultiScaleDeformableAttention as MSDA

 return MSDA







'''simple docstring'''

def __snake_case      (   UpperCAmelCase_		:		int = 1000	):
 return sum(2 * a * ((a - 1) // 2) for a in range(3      ,       n + 1	)	)


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



