version = int(input()) page = (version - 1) * 52 + 316 print(page)