{"size": 794, "ext": "js", "max_stars_repo_path": "10Days-of-Javascript/day03-arrays/problem.js", "max_stars_repo_name": "ThiagoLuizNunes/hacker-rank", "max_stars_repo_stars_event_min_datetime": "2020-07-01T12:33:50.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-01T12:33:50.000Z", "max_issues_repo_path": "10Days-of-Javascript/day03-arrays/problem.js", "max_issues_repo_name": "thiagoluiznunes/hacker-rank", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "10Days-of-Javascript/day03-arrays/problem.js", "max_forks_repo_name": "thiagoluiznunes/hacker-rank", "max_forks_repo_forks_event_min_datetime": "2019-12-21T07:37:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-13T15:54:04.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 5, "avg_line_length": 22.0555555556, "max_line_length": 68, "alphanum_fraction": 0.5743073048}
'use strict'

process.stdin.resume();
process.stdin.setEncoding('utf-8');

const readline = require('readline');

const rl = readline.createInterface({
    input: process.stdin,
    output: console.log
});

function getSecondLargest(nums) {
    let larger = 0;
    let secondLarger = 0;

    for (let i = 0; i < nums.length; i++) {
        let number = parseInt(nums[i]);
        if (number > larger) {
            secondLarger = larger;
            larger = number;
        }
        if ((number < larger) && (number > secondLarger)) {
            secondLarger = number;
        }
    }
    return secondLarger;
}

rl.on('line', input => {
    let nums = input.trim().split(' ').map(string => string.trim());
    let result = getSecondLargest(nums);
    rl.output(result);

    rl.close();
});