import sys from tqdm import tqdm def main(input): input_list: list = input.split(" ") for i in tqdm(range(25)): new_stones = [] for num in input_list: if num == '0': new_stones.extend(["1"]) elif len(num) % 2 == 0: half = len(num) // 2 left_half = str(int(num[:half])) right_half = str(int(num[half:])) new_stones.extend([left_half, right_half]) else: new_stones.extend([str(int(num)*2024)]) input_list = new_stones print(len(input_list)) if __name__ == "__main__": input_text = sys.stdin.read().strip() main(input_text)