macro_rules! scan {                                                                                                                                                              
    // Scan item                                                                                                                                                                 
    ($t:ty) => {                                                                                                                                                                 
        {                                                                                                                                                                        
            let mut buffer: String = String::new();                                                                                                                              
            std::io::stdin().read_line(&mut buffer).unwrap();                                                                                                                    
            buffer.trim().parse::<$t>().unwrap()                                                                                                                                 
        }                                                                                                                                                                        
    };                                                                                                                                                                           
    // Scan tuple                                                                                                                                                                
    ($($t:ty),*) => {                                                                                                                                                            
        {                                                                                                                                                                        
            let mut buffer: String = String::new();                                                                                                                              
            std::io::stdin().read_line(&mut buffer).unwrap();                                                                                                                    
            let mut it = buffer.split_whitespace();                                                                                                                              
            (                                                                                                                                                                    
                $(it.next().unwrap().parse::<$t>().unwrap(),)*                                                                                                                   
            )                                                                                                                                                                    
        }                                                                                                                                                                        
    };                                                                                                                                                                           
    // Scan values separated by whitespace                                                                                                                                       
    ($t:ty;) => {                                                                                                                                                                
        {                                                                                                                                                                        
            let mut buffer: String = String::new();                                                                                                                              
            std::io::stdin().read_line(&mut buffer).unwrap();                                                                                                                    
            buffer.split_whitespace()                                                                                                                                            
                .map(|t| t.parse::<$t>().unwrap())                                                                                                                               
                .collect::<Vec<_>>()                                                                                                                                             
        }                                                                                                                                                                        
    };                                                                                                                                                                           
}                                                                                                                                                                                
                                                                                                                                                                                 
fn main() {                                                                                                                                                                      
    let (_, k) = scan!(usize, usize);                                                                                                                                            
    let hs = scan!(usize;);                                                                                                                                                      
                                                                                                                                                                                 
    println!("{}", hs.into_iter().filter(|&h| h >= k).count());                                                                                                                  
}  

Measured memory_bytes: 4476