import sys
def convert_to_seconds(time_str):
# write code here
if 's' in time_str:
return float(time_str[:-1])
elif 'm' in time_str:
return float(time_str[:-1]) * 60
elif 'h' in time_str:
return float(time_str[:-1]) * 3600
elif 'd' in time_str:
return float(time_str[:-1]) * 3600 *24
elif 'D' in time_str:
return float(time_str[:-1]) * 3600 *24
while True:
line = sys.stdin.readline()
line = line.strip()
if line == '':
break
print(convert_to_seconds(line))
2020-04-24