using System;
public class Program
{
public static void Main()
int input = 7;
Console.WriteLine(Sum(input));
}
/* Sum of n numbers
* print the sum of numbers starting from 1 upto the limit inclusive of the limit
* exclude numbers divisible by 5 and 7
*/
private static int Sum(int val)
int i = 1;
int sum = 0;
while(i<=val){
if(!(i%5 == 0 || i%7 == 0)){
sum += i;
i++;
return sum;