M = 3
D = 1

month_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

days = sum(month_days[:M-1]) + D

print(days)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: