"""simple docstring"""




import itertools






def 	UpperCAmelCase       (						UpperCamelCase__ = 1_000_000					):






							"""simple docstring"""





							A__						  =				[1]

							for i in itertools.count(len(a__					)					):
														A__						  =				0
														for j in itertools.count(1					):
																					A__						  =				-1 if j % 2 == 0 else +1
																					A__						  =				(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(a__					)

							return 0


if __name__ == "__main__":
				import doctest

				doctest.testmod()

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











'''simple docstring'''
import numpy as np
def 							snake_case_    (  a__						:      Tuple     ):



    """simple docstring"""




    __lowercase							,__lowercase     							=		a.shape
    __lowercase     							=		min(a__       ,a__     )
    __lowercase     							=		np.eye(a__     )
    __lowercase     							=		a.copy()

    for k in range(t - 1     ):
        # select a column of modified matrix A':
        __lowercase     							=		r[k:, [k]]
        # construct first basis vector
        __lowercase     							=		np.zeros_like(a__     )
        __lowercase     							=		1.0
        # determine scaling factor
        __lowercase     							=		np.linalg.norm(a__     )
        # construct vector v for Householder reflection
        __lowercase     							=		x + np.sign(x[0]     ) * alpha * ea
        v /= np.linalg.norm(a__     )

        # construct the Householder matrix
        __lowercase     							=		np.eye(m - k     ) - 2.0 * v @ v.T
        # pad with ones and zeros as necessary
        __lowercase     							=		np.block([[np.eye(a__     ), np.zeros((k, m - k)     )], [np.zeros((m - k, k)     ), q_k]]     )

        __lowercase     							=		q @ q_k.T
        __lowercase     							=		q_k @ r

    return q, r


if __name__ == "__main__":
  import doctest

  doctest.testmod()




