#!/usr/bin/perl

use v5.30;
use strict;

use List::Util qw(min max);

my $res = 0;
while (<>) {
	my @a = split /\s+/;
	for my $i (0 .. $#a) {
	for my $j (0 .. $#a) {
		next if $i == $j;
		if (int ($a[$i]/$a[$j])*$a[$j] == $a[$i]) {
			$res += $a[$i]/$a[$j];
		}
	} }
}

say $res;

