## N-K Special

We define "n-k special" set X of positive integer numbers as follows:- each element x that belongs to set X must meet the restriction 1 ≤ x ≤ n
- the sum of elements of the set X must be larger than k
- no pair of elements belonging to the set can be consecutive numbers

### SAMPLE INPUT

5 6

### SAMPLE OUTPUT

3

### EXPLANATION

Sets:1. {1, 3, 5}

2. {2, 5}

3. {3, 5}

meet the given criteria. No other sets exist.

All Submissions

Best Solutions

**Point Value:** 20 (partial)

**Time Limit:** 2.00s

**Memory Limit:** 16M

**Added:** Jan 13, 2009

**Languages Allowed:**

C++03, PAS, C, ASM, C#, C++11

## Comments (Search)

Danielon Feb 15, 2009 - 1:44:06 pm UTC questionhansonw1on Feb 15, 2009 - 3:01:59 pm UTC Re: questionYou can either a) use string math or b) use 3 longints to store the number. (You might want to try aplusb2 first)

ilovepion Feb 06, 2011 - 5:34:53 am UTC Re: Re: questiondAedaLon Jan 13, 2009 - 11:32:57 pm UTC ...bbi5291on Jan 13, 2009 - 11:35:45 pm UTC Re: ...hansonw1on Jan 13, 2009 - 3:13:46 am UTC ...