



"""simple docstring"""

import itertools
def    __snake_case       (  __A			:	str    )    ->					Dict:






				'''simple docstring'''
				return (
				    int(''.join(combination[0:2]    )    ) * int(''.join(combination[2:5]    )    )
				    == int(''.join(combination[5:9]    )    )
				) or (
				    int(''.join(combination[0]    )    ) * int(''.join(combination[1:5]    )    )
				    == int(''.join(combination[5:9]    )    )
				)
def    __snake_case       (  )    ->					Any:






				'''simple docstring'''
				return sum(
				    {
				        int(''.join(pandigital[5:9]    )    )
				        for pandigital in itertools.permutations('123456789'    )
				        if is_combination_valid(__A    )
				    }    )


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










"""simple docstring"""

def    __snake_case       (  __A			:	int = 100    )    ->					int:






				'''simple docstring'''
				SCREAMING_SNAKE_CASE	:       Any 							=    1
				SCREAMING_SNAKE_CASE	:       Optional[int] 							=    0
				for i in range(1       ,		num + 1    ):
								fact *= i

				for j in str(__A    ):
								result += int(__A    )

				return result


if __name__ == "__main__":
							print(solution(int(input('Enter the Number: ').strip())))





