using System;
public class Test
{
public static void Main()
{
int def_val = 2;
int num = 0;
if(int.TryParse(Console.ReadLine(), out num) && num >= 1 && num <= 15)
{
Console.WriteLine(Convert.ToInt64(Math.Pow(Math.Pow(def_val, num) + 1, def_val)));
}
else
{
Console.WriteLine("허용된 숫자만 입력하세요~!!");
}
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJaW50IGRlZl92YWwgPSAyOwogICAgICAgICAgICBpbnQgbnVtID0gMDsKCiAgICAgICAgaWYoaW50LlRyeVBhcnNlKENvbnNvbGUuUmVhZExpbmUoKSwgb3V0IG51bSkgJiYgbnVtID49IDEgJiYgbnVtIDw9IDE1KQogICAgICAgIHsKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoQ29udmVydC5Ub0ludDY0KE1hdGguUG93KE1hdGguUG93KGRlZl92YWwsIG51bSkgKyAxLCBkZWZfdmFsKSkpOwogICAgICAgIH0KICAgICAgICBlbHNlCiAgICAgICAgewogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSgi7ZeI7Jqp65CcIOyIq+yekOunjCDsnoXroKXtlZjshLjsmpR+ISEiKTsKICAgICAgICB9Cgl9Cn0K