    Imports System.Collections
    Imports System.Collections.Generic
    Imports System.Linq
    Imports System.xml
    Imports System.xml.Linq
     
    Module Module1
      public sub main()
        
    dim N as string = Console.ReadLine()    
    dim intN as integer = convert.todouble(N)
    dim num as integer = 1
    dim sum as long = 0
    dim isRimit as boolean = false
    while (not isRimit)
      select case True
      case num = intN 
        isRimit = true
      case num mod (3*5) = 0
        'fizzbuzz
        num += 1
      case num mod 3 = 0 'fizz
        num += 1
      case num mod 5 = 0 'Buzz
        num += 1
      case else
        sum += num
        num += 1        
      End select
    end While
    console.writeLine(sum.tostring())
          
      end sub 
    End Module