






import itertools


def __A       ( __lowerCAmelCase = 1_000_000      )->    Dict:





						"""simple docstring"""



						_UpperCAmelCase							   =     [1]

						for i in itertools.count(len(__lowerCAmelCase      )      ):
												_UpperCAmelCase							   =     0
												for j in itertools.count(1      ):
																		_UpperCAmelCase							   =     -1 if j % 2 == 0 else +1
																		_UpperCAmelCase							   =     (j * j * 3 - j) // 2
																		if index > i:
																								break
																		item += partitions[i - index] * sign
																		item %= number
																		index += j
																		if index > i:
																								break
																		item += partitions[i - index] * sign
																		item %= number

												if item == 0:
																		return i
												partitions.append(__lowerCAmelCase      )

						return 0


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		print(F'''{solution() = }''')

"""simple docstring"""






import requests

try:
						from django.contrib.auth import authenticate, login
						from django.shortcuts import redirect, render
except ImportError:
						lowerCAmelCase__    :    Union[str, Any]			=      print



def     a_		(   lowerCamelCase			):
				# Enter your recaptcha secret key here
				UpperCAmelCase__			 =				'secretKey'
				UpperCAmelCase__			 =				'https://www.google.com/recaptcha/api/siteverify'

				# when method is not POST, direct user to login page
				if request.method != "POST":
								return render(lowerCamelCase   ,     'login.html'			)

				# from the frontend, get username, password, and client_key
				UpperCAmelCase__			 =				request.POST.get('username'			)
				UpperCAmelCase__			 =				request.POST.get('password'			)
				UpperCAmelCase__			 =				request.POST.get('g-recaptcha-response'			)

				# post recaptcha response to Google's recaptcha api
				UpperCAmelCase__			 =				requests.post(lowerCamelCase   ,     data={'secret': secret_key, 'response': client_key}			)
				# if the recaptcha api verified our keys
				if response.json().get('success'   ,     lowerCamelCase			):
								# authenticate the user
								UpperCAmelCase__			 =				authenticate(lowerCamelCase   ,     username=lowerCamelCase   ,     password=lowerCamelCase			)
								if user_in_database:
												login(lowerCamelCase   ,     lowerCamelCase			)
												return redirect('/your-webpage'			)
				return render(lowerCamelCase   ,     'login.html'			)



