a =[ [1,3,5,7], [9,11,13,15], [17,19,21,23] ] i,j = input().split() i = int(i) j = int(j) print( a[i][j] )