function make_judge() local FB, F, B = #"FizzBuzz", #"Fizz", #"Buzz" return function (n) local isF, isB = n % 3 == 0, n % 5 == 0 if isF and isB then return FB elseif isF then return F elseif isB then return B else return #(n .. "") end end end local s = io.stdin:read("*l") local r, judge = 0, make_judge() s:gsub("[0-9]+", function (e) r = r + judge(tonumber(e)) end) print(r)