use std::env;
use std::fs::File;
use std::io::{BufRead,BufReader};

fn main() {
    let filename = "input_day1_1.txt";
    let file = File::open(filename).unwrap();
    let reader = BufReader::new(file);
    let mut list = Vec::new();
    let mut temp: i32 = 0;
    for(index,line) in reader.lines().enumerate(){
        let line = line.unwrap();
        if(line.eq("")){
            list.push(temp);
            temp = 0;
        }else{
            temp += line.parse::<i32>().unwrap();
        }
    }
    list.sort();
    println!("{}",list[list.len() - 1]);
}
