#include "stdio.h"
int a1(int w, int x,int y,int z)
{
int y1;
y1=w*x+y-z;
return(y1);
}
main()
{
int a,b,c,d,y1;
scanf("%d%d%d%d",&a,&b,&c,&d);
y1=a1(a,b,c,d);
printf("y1=%d\n",y1);
}
int a1(int w, int x,int y,int z)
{
int y1;
y1=w*x+y-z;
return(y1);
}
main()
{
int a,b,c,d,y1;
scanf("%d%d%d%d",&a,&b,&c,&d);
y1=a1(a,b,c,d);
printf("y1=%d\n",y1);
}