import sys
m=''.join(["01","10"][sum(f=="1"for f in c)<len(c)/2]for c in zip(*open(sys.argv[3])))
print(int(m[1::2],2)*int(m[0::2],2))