#!/usr/bin/python import sys; sum = 0; num = int(sys.argv[1]); for i in range(3,num): if(((i % 3) == 0) or ((i % 5) == 0)): sum += i; print "Result is: " + str(sum);