#C1330. Sum of Divisible Numbers

    ID: 42823 Type: Default 1000ms 256MiB

Sum of Divisible Numbers

Sum of Divisible Numbers

Given two positive integers n and k, compute the sum of all positive integers up to n that are divisible by k.

The formula to compute the sum is derived as follows: Let m be the number of multiples of k less than or equal to n, i.e., m = \lfloor n/k \rfloor. Then the sum can be expressed as:

$$ S = k \times \frac{m(m+1)}{2} $$

where \(m = \lfloor n/k \rfloor\). Your task is to implement a program that reads the values of n and k from standard input and prints the result computed by the above formula.

inputFormat

The input consists of a single line containing two space-separated integers n and k (n, k > 0).

outputFormat

Output a single integer which is the sum of all positive integers less than or equal to n that are divisible by k.

## sample
10 3
18