#!/usr/bin/python # -*- coding: utf-8 -*- N = int(raw_input()) print ( N - 1 ) * 52 + 316