已知单项式3a^n+1y^4与2分之1a^3y^m-2是同类项,则m+n=