   a,b,c = gets.split.map &:to_i # 値の入力
    box = []
    box2 = []
    box3 = []
    # puts box.class
    # puts box2.class
    # puts box3.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
            box2 << a.div(i) # 商を取得し格納
            box2 << i # 除数を格納
        end
        box2.sort
    end
    (1..c).each do |i|
        if a.modulo(i) == 0
            box3 << a.div(i) # 商を取得し格納
            box3 << i # 除数を格納
        end
        box3.sort
    end
    puts (box & box2 & box3).count+1
