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