Ways of selecting one or more books= Total number of selections possible $-$ Selection where no book is selected.
Total number of ways of selecting books = ways for selecting maths * ways of selecting engineering * ways of selecting Medicine *ways of selecting Economics.
Ways of selecting Maths = Not picking any+picking 1 maths +picking 2 maths+.....picking 12 maths = 1+1+1+...1 (13 times) =13.
Similarly ways of selecting engineering = 8
Ways of selecting Medicine= 23
Ways of selecting Economics = 22
Ways in which no book is selected is only one way i.e not selecting any book.
Hence total number of ways = (13*8*23*22)-1 = 3327