begin
var num:=1;
while true do
if (num div 10 * 14 = num) then break;
num += 1;
end;
writeln(num);
end.
begin
var num:=1;
while true do
begin
if (num div 10 * 14 = num) then break;
num += 1;
end;
writeln(num);
end.