import algorithm, future, hashes, macros, math, sequtils, sets, strutils, tables, unicode template readString: string = stdin.readLine template readStrings: seq[string] = stdin.readLine.split template readInt: int = stdin.readLine.parseInt template readInts: seq[int] = readLine(stdin).split(" ").map(parseInt) template readFloat: float = stdin.readLine.parseFloat template readFloats: seq[float] = stdin.readLine.split.map(parseFloat) template times(n: int, body: untyped): untyped = (for _ in 0.. 0: if (N and 1) == 1: res = res * a mod P a = a * a mod P N = N div 2 res -= 1 res = res div 3 echo res