aaa = input() print (aaa-1)*52 + 316