import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; void main() { auto L = readln.strip.to!int; auto N = readln.strip.to!int; auto S = readln.split; (8 ^^ ((L - 3) / 3) * N).writeln; }