   a,b,c = gets.split.map &:to_i # 値の入力
    box = []
    box_2 = []
    box_3 = []
    # puts box.class
    # puts box_2.class
    # puts box_3.class
    (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
