

from typing import Any







class 					lowercase							:




				def __init__(   self ,  snake_case			):
											snake_case_     							=       data
											snake_case_     							=       None







class 					lowercase							:




				def __init__(   self			):
											snake_case_     							=       None




				def        a				(   self			):
											snake_case_     							=       self.head
											while temp is not None:
																		print(temp.data ,  end=' '			)
																		snake_case_     							=       temp.next
											print()




				def        a				(   self ,  snake_case			):
											snake_case_     							=       Node(snake_case			)
											snake_case_     							=       self.head
											snake_case_     							=       new_node




				def        a				(   self ,  snake_case ,  snake_case			):
											if node_data_a == node_data_a:
																		return
											else:
																		snake_case_     							=       self.head
																		while node_a is not None and node_a.data != node_data_a:
																									snake_case_     							=       node_a.next

																		snake_case_     							=       self.head
																		while node_a is not None and node_a.data != node_data_a:
																									snake_case_     							=       node_a.next

																		if node_a is None or node_a is None:
																									return

																		snake_case_							,       snake_case_     							=       node_a.data, node_a.data


if __name__ == "__main__":
					_UpperCAmelCase						:  int									=			LinkedList()
					for i in range(5, 0, -1):
										ll.push(i)

					ll.print_list()

					ll.swap_nodes(1, 4)
					print("""After swapping""")
					ll.print_list()







def    __lowerCamelCase      (					UpperCamelCase__ = 1000 ):







							'''simple docstring'''






							snake_case_     							=       2**power
							snake_case_     							=       0
							while n:
														snake_case_							,       snake_case_     							=       r + n % 10, n // 10
							return r


if __name__ == "__main__":
					print(solution(int(str(input()).strip())))




