





'''simple docstring'''







from math import factorial





def 							lowerCamelCase_   (	SCREAMING_SNAKE_CASE__   :      Any,      SCREAMING_SNAKE_CASE__   :      Union[str, Any] )			->						Optional[int]:
						return factorial(SCREAMING_SNAKE_CASE__ ) / (factorial(SCREAMING_SNAKE_CASE__ ) * factorial(n - r ))





def 							lowerCamelCase_   (	)			->						int:
						UpperCAmelCase_      :   str      =	0

						for i in range(1,      101 ):
												for j in range(1,      i + 1 ):
																		if combinations(SCREAMING_SNAKE_CASE__,      SCREAMING_SNAKE_CASE__ ) > 1E6:
																								total += 1
						return total


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







import torch

from accelerate import Accelerator, DistributedType







class 							lowercase						:




							def __enter__(							self):
												if self.enabled:
																	lowercase		      =		self.model.no_sync()
																	self.model_sync_obj.__enter__()

												return self




							def __exit__(							self  ,A__  ,A__  ,A__):
												if self.enabled:
																	# Average all models on exit
																	self._sync_and_avg_model_params()
																	self.model_sync_obj.__exit__(A__  ,A__  ,A__)




							def __init__(							self  ,A__  ,A__  ,A__  ,A__ = True):
												if accelerator.distributed_type not in [
												    DistributedType.NO,
												    DistributedType.MULTI_CPU,
												    DistributedType.MULTI_GPU,
												]:
																	raise NotImplementedError('''LocalSGD is supported only for CPUs and GPUs (no DeepSpeed or MegatronLM)''')
												lowercase		      =		enabled and accelerator.distributed_type != DistributedType.NO
												lowercase		      =		0
												if self.enabled:
																	lowercase		      =		accelerator
																	lowercase		      =		model
																	lowercase		      =		local_sgd_steps




							def 					A__ (							self):
												self.num_steps += 1
												if not self.enabled:
																	return

												if self.num_steps % self.local_sgd_steps == 0:
																	self._sync_and_avg_model_params()





							def 					A__ (							self):
												self.accelerator.wait_for_everyone()
												with self.accelerator.autocast():
																	for param in self.model.parameters():
																						lowercase		      =		self.accelerator.reduce(param.data  ,reduction='''mean''')




