var input = require('fs').readFileSync('/dev/stdin', 'utf8');

const n = input
let rList = [input]
addList (n, rList) => {
    var input = require('fs').readFileSync('/dev/stdin', 'utf8');
    rList.push(input)

   if (rList.length < n) {
     addList(n, rList);
  }
}

console.log(rList[0] - rList[-1])