import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long one = 316L, two = 368L, ans = one; for(long i = 1L; i < N; i++) { ans+=((ans + 52) - ans); } System.out.println(ans); } }