#include void main(void){ int a,b; scanf("%d %d",&a,&b); int i = 0; while((a + b + i)%3 == 0){ i++; } printf("%d",i); }