import strutils const base = 316 let n = parseInt readLine stdin echo base + 52 * n.pred