Problem:
Score : 100 points

Problem Statement

How many hours do we have until New Year at M o'clock (24-hour notation) on 30th, December?

Constraints

1≤M≤23

M is an integer.

Input

Input is given from Standard Input in the following format:

M

Output

If we have x hours until New Year at M o'clock on 30th, December, print x.

Sample Input 1

21

Sample Output 1

27

We have 27 hours until New Year at 21 o'clock on 30th, December.

Sample Input 2

12

Sample Output 2

36

Solution in Rust (1.15.1) (judge verdict: Accepted)

#[allow(unused_imports)]
use std::io::*;
#[allow(unused_imports)]
use std::str::*;
#[allow(unused_imports)]
use std::collections::*;

#[allow(dead_code)]
fn read<T: FromStr>(s: &mut StdinLock) -> T {
    let s = s.by_ref().bytes().map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok().unwrap()
}

#[allow(unused_macros)]
macro_rules! p {
    ($x:expr) 
    => (println!("{}", $x));
    ($x:expr, $y:expr)
    => (println!("{} {}", $x, $y));
    ($x:expr, $y:expr, $z:expr) 
    => (println!("{} {} {}", $x, $y, $z));
}

#[allow(unused_macros)]
macro_rules! pl {
    ($x:expr) 
    => (println!("{}", $x));
    ($x:expr, $y:expr)
    => (println!("{}\n{}", $x, $y));
    ($x:expr, $y:expr, $z:expr) 
    => (println!("{}\n{}\n{}", $x, $y, $z));
}

fn main() {
    let s = stdin();
    let mut s = s.lock();
    let s = &mut s;

    let n: i32 = read(s);
    p!(24 + 24 - n);
}