function Main(a, b, c) {
  
  console.log(1 * a + b * 1 - c * 1) 
	
}

const input = require('fs').readFileSync('/dev/stdin', 'utf8').split(' ').map(Number);
Main(input[0],input[1], input[2], input[3]);