




def 	_a      (						SCREAMING_SNAKE_CASE_							:				list[int]      ,      SCREAMING_SNAKE_CASE_							:				int     ):
					__lowerCAmelCase				   =       len(SCREAMING_SNAKE_CASE_     )
					__lowerCAmelCase				   =       [[False] * (required_sum + 1) for _ in range(arr_len + 1     )]

					# for each arr value, a sum of zero(0) can be formed by not taking any element
					# hence True/1
					for i in range(arr_len + 1     ):
										__lowerCAmelCase				   =       True

					# sum is not zero and set is empty then false
					for i in range(1      ,      required_sum + 1     ):
										__lowerCAmelCase				   =       False

					for i in range(1      ,      arr_len + 1     ):
										for j in range(1      ,      required_sum + 1     ):
															if arr[i - 1] > j:
																				__lowerCAmelCase				   =       subset[i - 1][j]
															if arr[i - 1] <= j:
																				__lowerCAmelCase				   =       subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

					return subset[arr_len][required_sum]


if __name__ == "__main__":
					import doctest

					doctest.testmod()










def 	_a      (						SCREAMING_SNAKE_CASE_							:				int = 1_00_00_00     ):
					__lowerCAmelCase				   =       [i - 1 for i in range(limit + 1     )]

					for i in range(2      ,      limit + 1     ):
										if phi[i] == i - 1:
															for j in range(2 * i      ,      limit + 1      ,      SCREAMING_SNAKE_CASE_     ):
																				phi[j] -= phi[j] // i

					return sum(phi[2 : limit + 1]     )


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




