解题思路

import java.util.Scanner;
public class Main{
    
    public static void main(String[] args){
        Scanner sin = new Scanner(System.in);
        int a = sin.nextInt();
        int b = sin.nextInt();
        int c = sin.nextInt();
        int d = sin.nextInt();
        
        System.out.println((a+b-c) * d);
    }
}