#!/usr/bin/env python3 print(316 + 52*(int(input()) -1))