n = str(input("請選擇主餐及升級的套餐"))
f = str(input("是否升級成大杯飲料"))
s = str(input("是否升級成大杯飲料"))
if(n == "1A"):
    if(f == "是"):
        if(s == "是"):
            print("總共為147元")
        elif(s == "否"):
            print("總共為134元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為140元")
        elif(s == "否"):
            print("總共為127元")
elif(n == "1B"):
    if(f == "是"):
        if(s == "是"):
            print("總共為160元")
        elif(s == "否"):
            print("總共為147元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為153元")
        elif(s == "否"):
            print("總共為140元")

#--------------------------------------------------
if(n == "2A"):
    if(f == "是"):
        if(s == "是"):
            print("總共為137元")
        elif(s == "否"):
            print("總共為124元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為130元")
        elif(s == "否"):
            print("總共為117元")
elif(n == "2B"):
    if(f == "是"):
        if(s == "是"):
            print("總共為137元")
        elif(s == "否"):
            print("總共為150元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為143元")
        elif(s == "否"):
            print("總共為130元")
#-------------------------------------------------------
if(n == "3A"):
    if(f == "是"):
        if(s == "是"):
            print("總共為157元")
        elif(s == "否"):
            print("總共為150元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為144元")
        elif(s == "否"):
            print("總共為137元")
elif(n == "3B"):
    if(f == "是"):
        if(s == "是"):
            print("總共為170元")
        elif(s == "否"):
            print("總共為157元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為163元")
        elif(s == "否"):
            print("總共為150元")
#------------------------------------
if(n == "4A"):
    if(f == "是"):
        if(s == "是"):
            print("總共為119元")
        elif(s == "否"):
            print("總共為112元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為106元")
        elif(s == "否"):
            print("總共為99元")
elif(n == "4B"):
    if(f == "是"):
        if(s == "是"):
            print("總共為132元")
        elif(s == "否"):
            print("總共為119元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為125元")
        elif(s == "否"):
            print("總共為112元")
#------------------------------------
if(n == "5A"):
    if(f == "是"):
        if(s == "是"):
            print("總共為135元")
        elif(s == "否"):
            print("總共為122元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為128元")
        elif(s == "否"):
            print("總共為115元")
elif(n == "5B"):
    if(f == "是"):
        if(s == "是"):
            print("總共為148元")
        elif(s == "否"):
            print("總共為135元")
    elif(f == "否"):
        if(s == "是"):
            print("總共為141元")
        elif(s == "否"):
            print("總共為128元")