fn main() { let a: i32 = input(); let b: i32 = input(); let s: String = input(); let y: f64 = s[3..].parse().unwrap(); let x = (a + 48) * 60 + b; let x = x + ((y * 60.0 + 1e-8) as i32) - 9 * 60; println!("{:02}:{:02}", x / 60 % 24, x % 60); } fn input() -> T { use std::io::Read; let stdin = std::io::stdin(); let stdin = stdin.bytes(); let token = stdin .skip_while(|x| x.as_ref().unwrap().is_ascii_whitespace()) .take_while(|x| !x.as_ref().unwrap().is_ascii_whitespace()) .map(|x| x.unwrap()) .collect(); let token = String::from_utf8(token).unwrap(); match token.parse() { Ok(x) => x, Err(_) => panic!("{}", token), } }