IDENTIFICATION DIVISION.
PROGRAM-ID. PLANINA.
      
DATA DIVISION.
    WORKING-STORAGE SECTION.
    01 INP PIC X(50).
        88 EOF VALUE SPACES.
    01 N PIC S9(2).
    01 ANS PIC Z(16).
      
PROCEDURE DIVISION.
    ACCEPT INP.
    UNSTRING INP
        DELIMITED BY SPACE
        INTO N
    COMPUTE N = 2**N + 1.
    COMPUTE ANS = N**2.
    DISPLAY function TRIM(ANS)
    STOP RUN.
