n = int(input("10"))
choose = (input("gb/mb"))
if choose == "gb":
m = (n*1024)
print(str(m) + " Мегабайт")
elif choose == "mb":
m = (n/1024)
print(str(m) + " Гигабайт")
n = int(input("10"))
choose = (input("gb/mb"))
if choose == "gb":
m = (n*1024)
print(str(m) + " Мегабайт")
elif choose == "mb":
m = (n/1024)
print(str(m) + " Гигабайт")