#include<stdio.h>
#include<string.h>

main()
{
  int a,b,c,d,e,f,g,h = 0;
  
  scanf("%d%d",&a,&b);
  scanf("%d",&c);
  scanf("%d%d",&d,&e);
  scanf("%d",&f);
  scanf("%d",&g);
  
  h = a-b;
  
  printf("%d",h);
}