#Lutece3238. Sentence know

Sentence know

Migrated from Lutece 3238 Sentence know

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

不畏人间苦,不惧世上难,万般皆磨炼,有志终逞愿。

橘淳之介为了穿越回原来的【青蓝岛】,回到文乃的身边,正在与世界的法则展开着激烈的斗争。

他现在所处的世界可以用一个长度为 nn01串 AA 来描述,而他想要穿越到的世界同样可以用一个长度为 nn01串 BB 来描述。

淳之介每秒都会进行如下的操作:在 [1,n][1,n] 中随机等概率选择一个正整数 ii,并将 AiA_i 翻转。

翻转操作的定义为:若 AiA_i 在操作前为 00,则将其置为 11;同理若 AiA_i 在操作前为 11,则将其置为 00

现在淳之介想要知道,当他第一次将世界线改变为想要的世界时(即01串 A=BA=B ),操作次数的期望是多少。

Input

输入的第一行包括一个正整数 nn,表示 01 串 A,BA,B 的长度。

接下来的两行每行一个长度为 nn 的 01 串,分别表示 A,BA,B

Output

输出一行一个整数,表示操作次数的期望对 998244353998244353 取模的结果。

Samples

2
00
01
3
4
1000
1110
665496254
5
01001
10111
665496277

Constraints

1n1061\le n\le 10^6,输入的 A,BA,B 均为01串。

Note

样例1至样例3对应的操作次数的期望的分数表示形式分别为 3,563,12533,\frac{56}{3},\frac{125}{3}