def minute_most_asleep(guards_awake_asleep, guard_number):
    """Calculate on which minute the guard was most often asleep"""
    calendar = guards_awake_asleep[guard_number]
    times_asleep = [0] * 60
    for events in calendar.values():
        for minute, event in events.items():
            if not event:
                times_asleep[minute] += 1
    most_times_asleep = max(times_asleep)
    minute_asleep = times_asleep.index(most_times_asleep)
    return minute_asleep