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