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