# coding=utf-8: s = 316 n = 52 v = int(input()) print(s + n * (v-1))