import strutils let N = stdin.readLine.parseInt echo 316 + (N - 1) * 52