#include<stdio.h>
#include<conio.h>

int main()
{
    int a,b,x,result;

    printf("Enter the value of x,a and b: ");
    scanf("%d %d %d",&x,&a,&b);

    result=(x-a)%b;

    printf("The result is %d",result);

    return 0;
}