program raf105;
var
n,n1,n2,n3: integer;
begin
write('Введите число: ');
readln(n);
n1:= n div 3;
n2:= n1;
if n mod 3 = 1 then
n3:= n1 + n mod 3
else if n mod 3 = 2 then
n3:= n1 + 1;
n2:= n1 + 1;
end
else
n3:= n1;
writeln(n1,' ',n2,' ',n3);
end.
program raf105;
var
n,n1,n2,n3: integer;
begin
write('Введите число: ');
readln(n);
n1:= n div 3;
n2:= n1;
if n mod 3 = 1 then
n3:= n1 + n mod 3
else if n mod 3 = 2 then
begin
n3:= n1 + 1;
n2:= n1 + 1;
end
else
n3:= n1;
writeln(n1,' ',n2,' ',n3);
end.
PascalABC