Help with sum the column having same content

Input file

hsa-miR-1       1
hsa-miR-1       1
hsa-miR-7-5p    1
hsa-miR-9-5p    1
hsa-miR-9-5p    2
hsa-miR-9-5p    1
hsa-miR-10a-5p  1
hsa-miR-10b-5p  1
hsa-miR-34a-5p  1
hsa-miR-34a-5p  1
.
.

Desired output file

hsa-miR-1       2
hsa-miR-7-5p    1
hsa-miR-9-5p    4
hsa-miR-10a-5p  1
hsa-miR-10b-5p  1
hsa-miR-34a-5p  2
.
.

Do anybody know how to sum the column 2 data if column 1 is exactly the same?
Desired output file should just content unique column 1 content by sum the column 2 data if they share same column 1.

Thanks for any advice.

Try this code :

awk '{a[$1]+=$2;} END {for(i in a) print i,a;}' inputfile