def solution():
    score = input()

    if score == "A+":
        print(4.3)
        return
    elif score == "A0":
        print(4.0)
        return
    elif score == "A-":
        print(3.7)
        return
    elif score == "B+":
        print(3.3)
        return
    elif score == "B0":
        print(3.0)
        return
    elif score == "B-":
        print(2.7)
        return
    elif score == "C+":
        print(2.3)
        return
    elif score == "C0":
        print(2.0)
        return
    elif score == "C-":
        print(1.7)
        return
    elif score == "D+":
        print(1.3)
        return
    elif score == "D0":
        print(1.0)
        return
    elif score == "D-":
        print(0.7)
        return
    elif score == "F":
        print(0.0)
        return
solution()