a,b,c = gets.split.map &:to_i
    box,box_2,box_3 = [],[],[]
    (1..a).each do |i|
        if a.modulo(i) == 0
            box << a.div(i)
            box << i
        end
        box.sort
    end
    (1..b).each do |i|
        if a.modulo(i) == 0
            box_2 << a.div(i) 
            box_2 << i 
        end
        box_2.sort
    end
    (1..c).each do |i|
        if a.modulo(i) == 0
            box_3 << a.div(i)
            box_3 << i
        end
        box_3.sort
    end
    puts (box & box_2 & box_3).count+1
