# https://yukicoder.me/problems/no/3412 from collections import deque MOD = 998244353 def main(): N = int(input()) next_nodes = [[] for _ in range(N)] for _ in range(N - 1): a, b = map(int, input().split()) next_nodes[a - 1].append(b - 1) next_nodes[b - 1].append(a - 1) next_childs = [[] for _ in range(N)] total_childs = [0] * N parents = [-2] * N parents[0] = -1 stack = deque() stack.append((0, 0)) while len(stack) > 0: v, index = stack.pop() while index < len(next_nodes[v]): w = next_nodes[v][index] if w == parents[v]: index += 1 continue parents[w] = v stack.append((v, index + 1)) stack.append((w, 0)) break if index == len(next_nodes[v]): p = parents[v] if p != -1: total_childs[p] += 1 + total_childs[v] next_childs[p].append(1 + total_childs[v]) answer = 0 for base_i in range(N): rest_p = N - 1 - total_childs[base_i] if rest_p > 0: next_childs[base_i].append(rest_p) two_num = 0 for x in next_childs[base_i]: if x > 1: two_num += 1 if two_num > 0: ans = pow(2, len(next_nodes[base_i]), MOD) answer += ans answer %= MOD else: ans = pow(2, len(next_nodes[base_i]), MOD) ans -= 2 ans %= MOD answer += ans answer %= MOD print(answer) if __name__ == "__main__": main()