参考代码
from datetime import datetime m,d=map(int,input().split()) t=(datetime(2021,m,d)-datetime(2021,1,15)).days print(f'{t} days')