#include <stdio.h>
int main (void)
{
    int A,B;
    printf("Input the width of window and the length of one of the curtain:\n");
    scanf("%d%d",&A,&B);
    if (A>2*B)
    {
        printf("%d",A-2*B);
    }
    else
    {
        if (A<B)
        {
            printf("0")
        }
        else
        {
            printf("0");
        }
    }
    return 0;
}
